npm run dev fails on my 5.4 when configuring passport API Authentication
See original GitHub issue$ npm run dev
@ dev C:\xampp\htdocs\TocApp cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
The system cannot find the path specified. events.js:160 throw er; // Unhandled ‘error’ event ^
Error: spawn node_modules/webpack/bin/webpack.js ENOENT
at notFoundError (C:\xampp\htdocs\TocApp\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (C:\xampp\htdocs\TocApp\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (C:\xampp\htdocs\TocApp\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script ‘cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\BRAYAN\AppData\Roaming\npm-cache_logs\2017-03-27T08_28_13_634Z-debug.log
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (4 by maintainers)
Top GitHub Comments
I had this issue i did the following steps and i have no issues anymore:
node_modules
directorypackage-lock.json
file -> very importantnpm install
npm run dev
My details:
npm -v => 5.0.3
node -v => v8.1.4
"laravel-mix": "^1.2.1",
"cross-env": "^5.0.1",
"vue": "^2.4.1",
i did a fresh installation of laravel updated my node and npm and all worked fine,followed these steps