I had this error running a Webpack config. Seemed like something went wrong with the
npm install
and it was unable to install webpack.
To fix this, run:
Uninstall Webpack and the CLI:
npm uninstall -g webpack npm uninstall webpack-cli
Re-Install webpack and the cli locally since installing webpack globally may cause issues:
"Note that this is not a recommended practice. Installing globally locks you down to a specific version of webpack and could fail in projects that use a different version."
npm install --save-dev webpack npm install --save-dev webpack-cli
Source: https://stackoverflow.com/questions/54599370/missing-script-webpack-in-npm