4

) I am getting this error: enter image description here

I installed versions webpack@3.10.0 but then I reinstalled 2.3.0, (I thought it would help....)

Thank you in advance for your answer ;)

Elder
  • 341
  • 3
  • 8
  • 21
  • 1
    I'm getting that same exact error. No fix found yet, even after trying to install webpack-cli. – cclloyd Mar 31 '18 at 22:46

3 Answers3

2

I recently had the same problem. What you have to do is to install the webpack-cli package with the -D flag in the terminal:

npm install webpack-cli -D

After you have installed the package update the dependencies in the package.json:

npm update

Now you should be able to start the server.

If this is not the case and you run in a configuration error you may have to change also something in the package.json. For that follow the link here.

Julian Schmuckli
  • 3,681
  • 11
  • 37
  • 64
2

For those using webpack 5, replace webpack-dev-server command with webpack serve

Lho Ben
  • 2,053
  • 18
  • 35
0

npm i -D webpack-cli

and then npm update solved the issue for me.

jayesh
  • 761
  • 6
  • 4