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 gives error

See original GitHub issue
  • Laravel Mix Version: #.#.# (npm list --depth=0) E:\xampp\htdocs\kngtravels>npm list --depth=0 E:\xampp\htdocs\kngtravels ±- axios@0.16.2 ±- bootstrap-sass@3.3.7 ±- cross-env@5.1.1 ±- jquery@3.2.1 ±- lodash@4.17.4 ±- node-sass@4.6.0 `-- vue@2.5.3
  • Node Version (node -v): v9.0.0
  • NPM Version (npm -v): 5.5.1
  • OS: Windows 7

Description:

E:\xampp\htdocs\kngtravels>npm run dev

@ dev E:\xampp\htdocs\kngtravels npm run development

@ development E:\xampp\htdocs\kngtravels 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:193 throw er; // Unhandled ‘error’ event ^

Error: spawn node_modules\webpack\bin\webpack.js ENOENT at notFoundError (E:\xampp\htdocs\kngtravels\node_modules\cross-spawn\lib\en oent.js:11:11) at verifyENOENT (E:\xampp\htdocs\kngtravels\node_modules\cross-spawn\lib\eno ent.js:46:16) at ChildProcess.cp.emit (E:\xampp\htdocs\kngtravels\node_modules\cross-spawn \lib\enoent.js:33:19) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12) 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/we bpack.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 log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\welcome\AppData\Roaming\npm-cache_logs\2017-11-09T17_18_5 3_222Z-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 log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\welcome\AppData\Roaming\npm-cache_logs\2017-11-09T17_18_5 3_263Z-debug.log

Steps To Reproduce:

this is my package.json file { “private”: true, “scripts”: { “dev”: “npm run development”, “development”: “cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js”, “watch”: “cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js”, “watch-poll”: “npm run watch – --watch-poll”, “hot”: “cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js”, “prod”: “npm run production”, “production”: “cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js” }, “devDependencies”: { “axios”: “^0.16.2”, “bootstrap-sass”: “^3.3.7”, “cross-env”: “^5.1.1”, “jquery”: “^3.1.1”, “laravel-mix”: “^1.0”, “lodash”: “^4.17.4”, “vue”: “^2.1.10” }, “dependencies”: { “node-sass”: “^4.6.0” } }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

23reactions
AhmedHdeawycommented, Dec 27, 2017

make sure that you have webpack installed run webpack -v

if not installed run sudo npm install webpack --save

14reactions
ankurk91commented, Nov 10, 2017

Your npm list --depth=0 result does not include laravel-mix@1.6.1? Anyway; it seems to be a windows os specific problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why I can not run Npm run dev? - Stack Overflow
Basically delete the node_modules folder and package-lock.json file , clear cache and do an npm install. Worked for me. Share.
Read more >
npm run dev error - Laracasts
I am getting this error message and trying to fix it: This is what I did: delete vendor delete node_modules. npm install composer...
Read more >
Error on npm run dev with Laravel Project · Issue #2761 - GitHub
I get following error when i am try to run npm run dev command on windows power-shell ... npm ERR! npm ERR! Failed...
Read more >
How To Fix “Laravel Mix NPM run dev error” - YouTube
This video will help you to solve the annoying “Laravel Mix NPM run dev error ” that you probably have seen before when...
Read more >
npm run dev Is Not Working In Laravel 8 - Error Fixed - YouTube
You will fix your error InchaeAllah in four steps, don't worry Music:https://www.youtube.com/watch?v=AOeY-nDp7hI&t=0s.
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