npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Webpack is always asking me to install its cli and it throws error when i run npm run build, even when i have installed it like 5000 times, it still shows me the same error

One CLI for webpack must be installed. These are recommended choi
ces, delivered as separate packages:

You need to install ‘webpack-cli’ to use webpack via CLI.
You can also install the CLI manually.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! babel_webpack_starter@1.0.0 build: webpack app.js dist/bundle.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the babel_webpack_starter@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/femi/.npm/_logs/2019-10-08T10_51_53_256Z-debug.log
Femis-MBP:babel_webpack_starter femi$


(You might get an answer here, but because this forum is focused on npm, you might want to ask your question somewhere that targets experts with your package. I have moved your topic to #community:javascript)

What command are you (unsuccessfully) running to install the webpack cli?


Hi John,

This is an image of the error, it brought a different error now. kindly help out.