[email protected] requires a peer of webpack@^4.x.x but none is installed
webpack-dev-server
has Webpack as a peer dependency, which means that you are responsible for installing that yourself.
You could install the latest version of Webpack and add it to your devDependencies
with the following command:
npm i -D webpack@latest
By writing webpack-dev-server
you are also trying to use the globally installed version of that package. You can use the locally installed one instead by adding it to a script in your package.json
:
{
"scripts" : {
"start": "webpack-dev-server"
}
}