npm install webpack webpack-cli webpack-dev-server
package.json
script configuration:
script: {
"start" : "webpack-dev-server"
}
Error when executing code npm run start
:
Cannot find module'webpack/bin/config-yargs'
My version number is as follows:
webpack-cli
downgrade processing, which I did beforepackage.json
to the following:script: {
"start" : "webpack server"
}
then Just execute npm run start
again and it will be OK.