I cloned this Webpack Starter package through github using gitbash following a tutorial on pluralsight. I am trying to access webpack through Visual Studio Code\'s integrate
For me, instead of installing webpack-dev-server globally, I simply uninstalled and reinstalled the local package:
npm uninstall webpack-dev-server
npm install webpack-dev-server
Recent versions of Webpack & WDS need webpack-cli package, I recommend you to downloaded if your Webpack version is 4 or higher
running
npm install -g webpack-dev-server
in cmd as an administrator solved my problem. I hope it helps others.
Webpack command should be present in location: node_modules\.bin\
In this case in package.json file we are referring to webpack-dev-server, but locally webpack-dev-server doesn't exist.
First run following command for global installation:
npm install -g webpack-dev-server
Second execute local installation command, which will create node_modules\.bin\webpack-dev-server
:
npm install webpack-dev-server --save-dev