npm ERR! code ELIFECYCLE in using NPM RUN SERVE in running PWA Vue.JS 3 Template App on Mac
Version
3.0.3
Node and OS info
Node: v8.12.0, NPM: 6.4.1
Steps to reproduce
I'm having an error while running the newly created pwa template from Vue.JS 3.
The command that I'm using is npm run serve
What is expected?
I'm expecting to run my pwa template.
What is actually happening?
Having error that says
The error says,
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] serve: vue-cli-service serve
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] serve 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! /var/root/.npm/_logs/2018-09-25T07_17_36_807Z-debug.log
Here's the full log from 2018-09-25T07_17_36_807Z-debug.log file
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'serve' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle [email protected]~preserve: [email protected]
6 info lifecycle [email protected]~serve: [email protected]
7 verbose lifecycle [email protected]~serve: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~serve: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/myuser/Documents/AppFolder$
9 verbose lifecycle [email protected]~serve: CWD: /Users/myser/Documents/AppFolder/mywebapp
10 silly lifecycle [email protected]~serve: Args: [ '-c', 'vue-cli-service serve' ]
11 silly lifecycle [email protected]~serve: Returned: code: 126 signal: null
12 info lifecycle [email protected]~serve: Failed to exec serve script
13 verbose stack Error: [email protected] serve: vue-cli-service serve
13 verbose stack Exit status 126
13 verbose stack at EventEmitter.vue-cli-service serve
22 error Exit status 126
23 error Failed at the [email protected] serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]
created pwa template from Vue.JS 3.
I assume that means you chose to install the PWA plugin during project creation? What other options did you choose?
You don't provide any details that would allow us to reproduce your scenario.
I am running into similar problems. I can run the build script, but the serve script is malfunctioning.
I created a test project using the default presets, and runs npm run serve immediately after creating the project.
Log here:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'serve' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle [email protected]~preserve: [email protected]
6 info lifecycle [email protected]~serve: [email protected]
7 verbose lifecycle [email protected]~serve: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~serve: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/michael/projects/test/node_modules/.bin:/home/michael/miniconda3/bin:/home/michael/dotfiles/scripts:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
9 verbose lifecycle [email protected]~serve: CWD: /home/michael/projects/test
10 silly lifecycle [email protected]~serve: Args: [ '-c', 'vue-cli-service serve' ]
11 silly lifecycle [email protected]~serve: Returned: code: 1 signal: null
12 info lifecycle [email protected]~serve: Failed to exec serve script
13 verbose stack Error: [email protected] serve: `vue-cli-service serve`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/michael/projects/test
16 verbose Linux 4.14.71-1-MANJARO
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "serve"
18 verbose node v10.10.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] serve: `vue-cli-service serve`
22 error Exit status 1
23 error Failed at the [email protected] serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
It seems that EventEmitter is running into some issues. This is probably caused by some upstream changes, since I was able to run the script fine a week or so earlier, and I probably updated something in the mean time.
Yes, @LinusBorg I included the pwa template during the project creation.
So, the problem mysteriously solves itself for me. @deanilvincent Try running npm run serve again. It's probably an upstream issue that is solved now.
Honestly, I've tried it so many times but still, the error persists. I've tried to clean the npm cache, delete node_modules folder then do some package restoration but nothing works.
Maybe a permission issue. Try sudo?
@sodatea Yup, I already tried it using sudo before posting this question. :(
Same problem here. I saw the issue is an error ENOSPC. Searching on stackoverflow I found this
https://stackoverflow.com/questions/22475849/node-js-error-enospc
that seems to fix the problem.
@deanilvincent Does @ardf69 's tip help?
Closing due to inactivity for more than 1 week. Please open a new issue with a reference to this one if you can follow up with more information.
hello , did you fix this problem? i am in the same position now. please help
npm install [email protected]
rm -rf node_modules/ npm install
Same issue here.
I was a same problem , I wait a little time and without do anything, after that, and sorprise, it working, but i don know the reason :''c
same issue here. anybody solve this problem?
Same issue here! :|
Same issue.
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'serve' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle <project_name>@0.1.0~preserve: <project_name>@0.1.0
6 info lifecycle <project_name>@0.1.0~serve: <project_name>@0.1.0
7 verbose lifecycle <project_name>@0.1.0~serve: unsafe-perm in lifecycle true
8 verbose lifecycle <project_name>@0.1.0~serve: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/<path_to_project>/<project_name>/node_modules/.bin:/home/vagrant/.composer/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle <project_name>@0.1.0~serve: CWD: /<path_to_project>/<project_name>
10 silly lifecycle <project_name>@0.1.0~serve: Args: [ '-c', 'vue-cli-service serve' ]
11 silly lifecycle <project_name>@0.1.0~serve: Returned: code: 1 signal: null
12 info lifecycle <project_name>@0.1.0~serve: Failed to exec serve script
13 verbose stack Error: <project_name>@0.1.0 serve: `vue-cli-service serve`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid <project_name>@0.1.0
15 verbose cwd /<path_to_project>/<project_name>
16 verbose Linux 4.15.0-47-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "serve"
18 verbose node v10.15.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error <project_name>@0.1.0 serve: `vue-cli-service serve`
22 error Exit status 1
23 error Failed at the <project_name>@0.1.0 serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Can anyone fixed it? I'm also see same problem?
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle [email protected]~predev: [email protected]
6 info lifecycle [email protected]~dev: [email protected]
7 verbose lifecycle [email protected]~dev: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~dev: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/mac/Documents/code/admin_navihome/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
9 verbose lifecycle [email protected]~dev: CWD: /Users/mac/Documents/code/admin_navihome
10 silly lifecycle [email protected]~dev: Args: [ '-c',
10 silly lifecycle 'webpack-dev-server --inline --progress --config build/webpack.dev.conf.js' ]
11 silly lifecycle [email protected]~dev: Returned: code: 1 signal: null
12 info lifecycle [email protected]~dev: Failed to exec dev script
13 verbose stack Error: [email protected] dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/mac/Documents/code/admin_navihome
16 verbose Darwin 18.5.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
18 verbose node v10.15.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
22 error Exit status 1
23 error Failed at the [email protected] dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]