Small partners in the use of webpack scaffolding, must pay attention to global and local installations, before I forget global installed, resulting in the project has been run error, wasted a long time
1, the global installed
npm install webpack -g
npm install webpack-dev-server -g
2, check the version number
asl info WebPack
webpack -v
If it does not, npm install --global webpack-cli, because
Note: webpack 4x or more, webpack command related content are placed in webpack-cli, so also need to install webpack-cli;
After re-webpack -v