question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 6 years ago
  • Comments:24 (4 by maintainers)

github_iconTop GitHub Comments

82reactions
hassanazimicommented, Sep 1, 2017

I had this issue i did the following steps and i have no issues anymore:

  1. Delete node_modules directory
  2. Detete package-lock.json file -> very important
  3. Run npm install
  4. Run 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",

47reactions
Brayantezzcommented, Mar 28, 2017

i did a fresh installation of laravel updated my node and npm and all worked fine,followed these steps

run composer install;
run npm install;
run npm install cross-env -D (read it from laravel/framework#18446);
run npm run dev.
Read more comments on GitHub >

github_iconTop Results From Across the Web

npm run dev fails on my 5.4 when configuring passport API ...
Failed at the @ dev script 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/ ...
Read more >
How to resolve Laravel passport install error? - Stack Overflow
Everything works great till I have to run the command npm run dev and then I get the following error. I'm looking for...
Read more >
Broadcasting - Laravel - The PHP Framework For Web Artisans
Event broadcasting is accomplished by a server-side broadcasting driver that broadcasts your Laravel events so that Laravel Echo (a JavaScript library) can ...
Read more >
How to Build a Node.js Authentication API with Email ...
How to Build a Node.js Authentication API with Email Verification, Image Upload and Password Reset using JWT, Passport.js and Sendgrid.
Read more >
easy-no-password - npm
The increasing scrutiny over weak passwords has been leading more and more developers to opt for passwordless login flows and two-factor ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found