Laravel Mix npm run dev error
See original GitHub issue- Laravel Mix Version: 1.4.2 (
npm list --depth=0
) - Node Version (
node -v
): v8.2.1 - NPM Version (
npm -v
): 5.3.0 - OS: Debian 8
Description:
When I’m running the command npm run dev
, I’m getting the following output with an error:
root@gra2-status:/var/www/webinterface# npm run dev
> @ dev /var/www/webinterface
> npm run development
> @ development /var/www/webinterface
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
events.js:182
throw er; // Unhandled 'error' event
^
Error: spawn node_modules/webpack/bin/webpack.js ENOENT
at exports._errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:607:11)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575: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-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
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! /root/.npm/_logs/2017-07-29T07_18_17_185Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev 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! /root/.npm/_logs/2017-07-29T07_18_17_205Z-debug.log
Steps To Reproduce:
Clean Laravel Installation (
composer create-project laravel/laravel webinterface
)
- run: composer install
- run: npm install
- run: npm run dev
Issue Analytics
- State:
- Created 6 years ago
- Reactions:178
- Comments:123 (1 by maintainers)
Top Results From Across the Web
In laravel npm run dev errors: - Stack Overflow
Solution that worked for me : I had unstalled npm which was installed globally and reinstalled the same globally and "npm run dev"...
Read more >npm run dev error - Laracasts
It seems that friendly-errors-webpack-plugin isnt loaded.. Is this a very old laravel project or something? It should be in node_modules/laravel-mix/package.
Read more >npm run dev issue (npm ERR! code ELIFECYCLE) - scmGalaxy
Step 2:- Recheck your package.json and webpack.mix.js file it is correct or not. Step 3:- Then Delete the Node Module file which is...
Read more >npm run dev is showing error on existing Laravel Project
npm run dev is showing error on existing Laravel Project ... Hello, I did everything described here: https://preview.keenthemes.com/html/metronic/docs/getting- ...
Read more >Compiling Assets (Mix) - The PHP Framework For Web Artisans
Before running Mix, you must first ensure that Node.js and NPM are ... When you run the dev or production scripts, all of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just followed those steps, and everything worked correctly. Try doing a full reset:
These javascript tools tend to remind me to good old Windows:
🎢