mardi 10 avril 2018

npm run watch not working in Laravel

When I execute npm run watch in Laravel, I have the follow error:

Error: spawn node_modules/webpack/bin/webpack.js ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
at onErrorNT (internal/child_process.js:379:16)
at process._tickCallback (internal/process/next_tick.js:114:19)
at Function.Module.runMain (module.js:692:11)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:666:3
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:207:12)
at onErrorNT (internal/child_process.js:379:16)
[... lines matching original stack trace ...]
at bootstrap_node.js:666:3


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-module --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ development 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!     /home/devel2/.npm/_logs/2018-04-10T09_06_26_796Z-debug.log

I tried to fix changing the package.json and reinstall npm https://github.com/laravel/laravel/blob/master/package.json

Also, I tried to run the follow commands:

Step1: composer update Step2: rm -rf node_modules Step3: npm cache clean Step4: npm install Step5: npm outdated In this step, I update my laravel-mix version to 1.2.0, it is in the package.json. Step6: npm install Step7: npm run dev

But it not working yet.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire