Abdallah M Yassin
Abdallah M Yassin

Reputation: 87

why does webpack gives error when run npm run dev

I'm trying to run "npm run dev" in my laravel project but there is an error occured that saying: Error: Cannot find module 'webpack-cli/package.json' Require stack:

Note that the webpack cli has been downloaded.

Upvotes: 5

Views: 6809

Answers (2)

Hussain Mahamud
Hussain Mahamud

Reputation: 39

Just follow this below steps:

  1. Clear the log file resides on the directory(*****\AppData\Roaming\npm-cache\_logs)
  2. npm i -g webpack-cli [Execute this command]
  3. npm install && npm run dev

Upvotes: 0

user633440
user633440

Reputation:

Try running the following.

npm install -g webpack-cli

Upvotes: 3

Related Questions