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:
- Created 6 years ago
- Reactions:4
- Comments:17 (2 by maintainers)
make sure that you have webpack installed run
webpack -v
if not installed run
sudo npm install webpack --save
Your
npm list --depth=0
result does not includelaravel-mix@1.6.1
? Anyway; it seems to be a windows os specific problem.