webpack-cli icon indicating copy to clipboard operation
webpack-cli copied to clipboard

Error: Cannot find module 'webpack-cli'

Open ahmedfarag2010 opened this issue 8 years ago • 17 comments

we

ahmedfarag2010 avatar May 06 '18 15:05 ahmedfarag2010

Could you install it globally?

evenstensberg avatar May 06 '18 15:05 evenstensberg

Try out [email protected]

evenstensberg avatar May 06 '18 15:05 evenstensberg

Yeah it's worked .. thank you .. But appeared a new error when i try to bundle js file.

33

ahmedfarag2010 avatar May 06 '18 16:05 ahmedfarag2010

Did you install it locally or globally? Try webpack script.1 --o bundle.js

evenstensberg avatar May 07 '18 21:05 evenstensberg

Yeah it worked .. thank you ..

ahmedfarag2010 avatar May 08 '18 14:05 ahmedfarag2010

Did you install the cli locally?

evenstensberg avatar May 08 '18 14:05 evenstensberg

same problem using 3.0.0 cant find solution here! didnt worked for me

indigenous007 avatar Jul 11 '18 07:07 indigenous007

Try upgrading to webpack-cli v.3.0.2 and above

evenstensberg avatar Jul 11 '18 15:07 evenstensberg

installing webpack-cli globally solved it for me npm i -g webpack-cli

cvaliere avatar Jul 25 '18 09:07 cvaliere

The error was due to you installing webpack globally and trying to install the webpack-cli locally. I face the same problem.

47arathore avatar Oct 02 '18 07:10 47arathore

npm rm -g webpack-cli And in the project npm i -D webpack-cli

That did it for me

Neskews avatar Nov 14 '18 18:11 Neskews

may be the solution of this problem is below

I also got this problem.... Capture

it should be in sequence in package.json Capture

moonstone-code avatar Oct 15 '19 06:10 moonstone-code

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

lisa0826 avatar Jan 28 '20 12:01 lisa0826

npm install [email protected] --save-dev

nischalpilmong avatar Apr 07 '20 13:04 nischalpilmong

npm uninstall -g webpack-cli then npm i webpack-cli

That did it for me

LitStronger avatar Dec 15 '20 03:12 LitStronger

installing webpack-cli globally solved it for me npm i -g webpack-cli

全球安装webpack-cli为我解决了 npm i -g webpack-cli

我查了半天,按照你这个解决了

web-chenke avatar Feb 23 '21 06:02 web-chenke

I also faced this problem & I solved this by following the steps

At first, open Windows PowerShell with Run as administrator mood then copy & paste the below commands..

npm rm -g webpack-cli npm i -g webpack-cli

Screenshot_6

ma-foyez avatar Mar 25 '22 17:03 ma-foyez