Webpack: Npm run dev issue

Created on 22 May 2017  路  2Comments  路  Source: vuejs-templates/webpack

Hi,

Get this error when trying to run npm run dev:

test_vue.[email protected] dev /var/www/html/test_vue.loc
node build/dev-server.js

Starting dev server...

DONE Compiled successfully in 16577ms 5:22:15 AM

Listening at http://localhost:2222

internal/child_process.js:319
throw errnoException(err, 'spawn');
^

Error: spawn EACCES
at exports._errnoException (util.js:1050:11)
at ChildProcess.spawn (internal/child_process.js:319:11)
at Object.exports.spawn (child_process.js:378:9)
at module.exports (/var/www/html/test_vue.loc/node_modules/opn/index.js:75:24)
at devMiddleware.waitUntilValid (/var/www/html/test_vue.loc/build/dev-server.js:79:5)
at continueBecauseBundleAvailable (/var/www/html/test_vue.loc/node_modules/webpack-dev-middleware/lib/Shared.js:122:6)
at Array.forEach (native)
at /var/www/html/test_vue.loc/node_modules/webpack-dev-middleware/lib/Shared.js:121:9
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)

npm ERR! Linux 3.13.0-117-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test_vue.[email protected] dev: node build/dev-server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test_vue.[email protected] dev script 'node build/dev-server.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 test_vue.loc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs test_vue.loc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls test_vue.loc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/vagrant/.npm/_logs/2017-05-22T05_22_15_484Z-debug.log
vagrant@vagrant-ubuntu-trusty-64:/var/www/html/test_vue.loc$ ^C
vagrant@vagrant-ubuntu-trusty-64:/var/www/html/test_vue.loc$`

INCLUDE:

/home/vagrant/.npm/_logs/2017-05-22T05_22_15_484Z-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle test_vue.[email protected]~predev: test_vue.[email protected]
6 silly lifecycle test_vue.[email protected]~predev: no script for predev, continuing
7 info lifecycle test_vue.[email protected]~dev: test_vue.[email protected]
8 verbose lifecycle test_vue.[email protected]~dev: unsafe-perm in lifecycle true
9 verbose lifecycle test_vue.[email protected]~dev: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/var/www/html/test_vue.loc/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
10 verbose lifecycle test_vue.[email protected]~dev: CWD: /var/www/html/test_vue.loc
11 silly lifecycle test_vue.[email protected]~dev: Args: [ '-c', 'node build/dev-server.js' ]
12 silly lifecycle test_vue.[email protected]~dev: Returned: code: 1 signal: null
13 info lifecycle test_vue.[email protected]~dev: Failed to exec dev script
14 verbose stack Error: test_vue.[email protected] dev: node build/dev-server.js
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:194:7)
14 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:194:7)
14 verbose stack at maybeClose (internal/child_process.js:899:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid test_vue.[email protected]
16 verbose cwd /var/www/html/test_vue.loc
17 error Linux 3.13.0-117-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
19 error node v7.10.0
20 error npm v4.2.0
21 error code ELIFECYCLE
22 error errno 1
23 error test_vue.[email protected] dev: node build/dev-server.js
23 error Exit status 1
24 error Failed at the test_vue.[email protected] dev script 'node build/dev-server.js'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the test_vue.loc package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error node build/dev-server.js
24 error You can get information on how to open an issue for this project with:
24 error npm bugs test_vue.loc
24 error Or if that isn't available, you can get their info via:
24 error npm owner ls test_vue.loc
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

nodejs -- v7.10.0
npm -- 4.2.0

webpack installs with no issues.

Any suggestions please?

Most helpful comment

Issue related to opn package. Workaround:

chmod +x node_modules/opn/xdg-open

All 2 comments

Looks like you have a file permissions issue. Check the permissions on the first few js files in the stack trace.

Issue related to opn package. Workaround:

chmod +x node_modules/opn/xdg-open
Was this page helpful?
0 / 5 - 0 ratings