
Could you install it globally?
Try out [email protected]
Yeah it's worked .. thank you ..
But appeared a new error when i try to bundle js file.

Did you install it locally or globally? Try webpack script.1 --o bundle.js
Yeah it worked .. thank you ..
Did you install the cli locally?
same problem using 3.0.0 cant find solution here!
didnt worked for me
Try upgrading to webpack-cli v.3.0.2 and above
installing webpack-cli globally solved it for me
npm i -g webpack-cli
The error was due to you installing webpack globally and trying to install the webpack-cli locally. I face the same problem.
npm rm -g webpack-cli
And in the project
npm i -D webpack-cli
That did it for me
may be the solution of this problem is below
I also got this problem....
it should be in sequence in package.json
webpack 4.41.5
webpack-cli 3.0.2
npx webpack hello.js --output-filename hello.bundle.js --output-path . --mode development
It's ok
npm install [email protected] --save-dev
npm uninstall -g webpack-cli
then
npm i webpack-cliThat did it for me
installing webpack-cli globally solved it for me
npm i -g webpack-cli
全球安装webpack-cli为我解决了
npm i -g webpack-cli
我查了半天,按照你这个解决了
Most helpful comment
installing webpack-cli globally solved it for me
npm i -g webpack-cli