Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm ERR! code ELIFECYCLE in using NPM RUN SERVE in running PWA Vue.JS 3 Template App on Mac #2596

Closed
deanilvincent opened this issue Sep 25, 2018 · 45 comments
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author

Comments

@deanilvincent
Copy link

deanilvincent commented Sep 25, 2018

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! mywebapp@0.1.0 serve: vue-cli-service serve
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the mywebapp@0.1.0 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 npm@6.4.1
3 info using node@v8.12.0
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle mywebapp@0.1.0preserve: mywebapp@0.1.0
6 info lifecycle mywebapp@0.1.0
serve: mywebapp@0.1.0
7 verbose lifecycle mywebapp@0.1.0serve: unsafe-perm in lifecycle true
8 verbose lifecycle mywebapp@0.1.0
serve: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/myuser/Documents/AppFolder$
9 verbose lifecycle mywebapp@0.1.0serve: CWD: /Users/myser/Documents/AppFolder/mywebapp
10 silly lifecycle mywebapp@0.1.0
serve: Args: [ '-c', 'vue-cli-service serve' ]
11 silly lifecycle mywebapp@0.1.0serve: Returned: code: 126 signal: null
12 info lifecycle mywebapp@0.1.0
serve: Failed to exec serve script
13 verbose stack Error: mywebapp@0.1.0 serve: vue-cli-service serve
13 verbose stack Exit status 126
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:915:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid mywebapp@0.1.0
15 verbose cwd /Users/myuser/Documents/AppFolder/mywebapp
16 verbose Darwin 17.7.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "serve"
18 verbose node v8.12.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 126
22 error mywebapp@0.1.0 serve: vue-cli-service serve
22 error Exit status 126
23 error Failed at the mywebapp@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 [ 126, true ]

@deanilvincent deanilvincent changed the title npm ERR! code ELIFECYCLE in using NPM RUN SERVE in running PWA Vue.JS Template App npm ERR! code ELIFECYCLE in using NPM RUN SERVE in running PWA Vue.JS 3 Template App Sep 25, 2018
@deanilvincent deanilvincent changed the title npm ERR! code ELIFECYCLE in using NPM RUN SERVE in running PWA Vue.JS 3 Template App npm ERR! code ELIFECYCLE in using NPM RUN SERVE in running PWA Vue.JS 3 Template App on Mac Sep 25, 2018
@LinusBorg LinusBorg added the needs reproduction This issue is missing a minimal runnable reproduction, provided by the author label Sep 29, 2018
@LinusBorg
Copy link
Member

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.

@michaelmyc
Copy link

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 npm@6.4.1
3 info using node@v10.10.0
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle test@0.1.0~preserve: test@0.1.0
6 info lifecycle test@0.1.0~serve: test@0.1.0
7 verbose lifecycle test@0.1.0~serve: unsafe-perm in lifecycle true
8 verbose lifecycle test@0.1.0~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 test@0.1.0~serve: CWD: /home/michael/projects/test
10 silly lifecycle test@0.1.0~serve: Args: [ '-c', 'vue-cli-service serve' ]
11 silly lifecycle test@0.1.0~serve: Returned: code: 1  signal: null
12 info lifecycle test@0.1.0~serve: Failed to exec serve script
13 verbose stack Error: test@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: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 test@0.1.0
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 test@0.1.0 serve: `vue-cli-service serve`
22 error Exit status 1
23 error Failed at the test@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 ]

@michaelmyc
Copy link

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.

@deanilvincent
Copy link
Author

Yes, @LinusBorg I included the pwa template during the project creation.

@michaelmyc
Copy link

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.

@deanilvincent
Copy link
Author

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.

@sodatea
Copy link
Member

sodatea commented Oct 7, 2018

Maybe a permission issue. Try sudo?

@deanilvincent
Copy link
Author

@sodatea Yup, I already tried it using sudo before posting this question. :(

@ardf69
Copy link

ardf69 commented Oct 8, 2018

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.

@LinusBorg
Copy link
Member

@deanilvincent Does @ardf69 's tip help?

@sodatea
Copy link
Member

sodatea commented Nov 1, 2018

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.

@sodatea sodatea closed this as completed Nov 1, 2018
@gagayang
Copy link

hello , did you fix this problem? i am in the same position now. please help

@erkanrose
Copy link

npm install terser@3.14

@joshuaemeke
Copy link

rm -rf node_modules/
npm install

@DannyFeliz
Copy link

Same issue here.

@edhak
Copy link

edhak commented Apr 3, 2019

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

@lay126
Copy link

lay126 commented Apr 17, 2019

same issue here.
anybody solve this problem?

@amigoow
Copy link

amigoow commented Apr 27, 2019

Same issue here! :|

@Tarasovych
Copy link

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 npm@6.9.0
3 info using node@v10.15.3
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 ]

@cuongdevjs
Copy link

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 npm@6.9.0 3 info using node@v10.15.3 4 verbose run-script [ 'predev', 'dev', 'postdev' ] 5 info lifecycle admin-navihome@1.0.0~predev: admin-navihome@1.0.0 6 info lifecycle admin-navihome@1.0.0~dev: admin-navihome@1.0.0 7 verbose lifecycle admin-navihome@1.0.0~dev: unsafe-perm in lifecycle true 8 verbose lifecycle admin-navihome@1.0.0~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 admin-navihome@1.0.0~dev: CWD: /Users/mac/Documents/code/admin_navihome 10 silly lifecycle admin-navihome@1.0.0~dev: Args: [ '-c', 10 silly lifecycle 'webpack-dev-server --inline --progress --config build/webpack.dev.conf.js' ] 11 silly lifecycle admin-navihome@1.0.0~dev: Returned: code: 1 signal: null 12 info lifecycle admin-navihome@1.0.0~dev: Failed to exec dev script 13 verbose stack Error: admin-navihome@1.0.0 dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js13 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 admin-navihome@1.0.0 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 admin-navihome@1.0.0 dev:webpack-dev-server --inline --progress --config build/webpack.dev.conf.js22 error Exit status 1 23 error Failed at the admin-navihome@1.0.0 dev script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

@umeralpha
Copy link

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm@6.9.0
3 info using node@v10.15.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle websoftic@0.1.0prestart: websoftic@0.1.0
6 info lifecycle websoftic@0.1.0
start: websoftic@0.1.0
7 verbose lifecycle websoftic@0.1.0start: unsafe-perm in lifecycle true
8 verbose lifecycle websoftic@0.1.0
start: PATH: C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Administrator\desktop\websoftic\node_modules.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Administrator\bin;C:\orant\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Java\jdk1.8.0_161\bin;C:\orant\jdk\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\Java\jdk1.8.0_161;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Administrator\AppData\Roaming\npm
9 verbose lifecycle websoftic@0.1.0start: CWD: C:\Users\Administrator\desktop\websoftic
10 silly lifecycle websoftic@0.1.0
start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle websoftic@0.1.0start: Returned: code: 1 signal: null
12 info lifecycle websoftic@0.1.0
start: Failed to exec start script
13 verbose stack Error: websoftic@0.1.0 start: react-scripts start
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Users\Administrator\AppData\Roaming\npm\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. (C:\Users\Administrator\AppData\Roaming\npm\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 websoftic@0.1.0
15 verbose cwd C:\Users\Administrator\desktop\websoftic
16 verbose Windows_NT 6.3.9600
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start"
18 verbose node v10.15.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error websoftic@0.1.0 start: react-scripts start
22 error Exit status 1
23 error Failed at the websoftic@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

if have this type of error ....any help !

@cuongdevjs
Copy link

fix it in package.json file. it's problem with webpack version, delete character ^ before version.
It's working for me. Hope help.

@smelike
Copy link

smelike commented Jun 4, 2019

Same issue. Still not fix it.

@smelike
Copy link

smelike commented Jun 4, 2019

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'serve' ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle ys-admin@0.1.0preserve: ys-admin@0.1.0
6 info lifecycle ys-admin@0.1.0
serve: ys-admin@0.1.0
7 verbose lifecycle ys-admin@0.1.0serve: unsafe-perm in lifecycle true
8 verbose lifecycle ys-admin@0.1.0
serve: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\zcsys\manage\node_modules.bin;C:\Users\Administrator\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Administrator\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd;C:\wamp64\bin\php\php7.2.14;C:\ProgramData\ComposerSetup\bin;C:\Program Files\PuTTY;C:\Program Files\dotnet;C:\Program Files (x86)\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files\nodejs;C:\Users\Administrator\AppData\Roaming\Composer\vendor\bin;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Administrator\AppData\Local\Programs\Fiddler;C:\wamp64\bin\mysql\mysql5.7.24\bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle ys-admin@0.1.0serve: CWD: E:\zcsys\manage
10 silly lifecycle ys-admin@0.1.0
serve: Args: [ '/d /s /c', 'vue-cli-service serve' ]
11 silly lifecycle ys-admin@0.1.0serve: Returned: code: 1 signal: null
12 info lifecycle ys-admin@0.1.0
serve: Failed to exec serve script
13 verbose stack Error: ys-admin@0.1.0 serve: vue-cli-service serve
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid ys-admin@0.1.0
15 verbose cwd E:\zcsys\manage
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "serve"
18 verbose node v10.16.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error ys-admin@0.1.0 serve: vue-cli-service serve
22 error Exit status 1
23 error Failed at the ys-admin@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 ]

@doProgramming
Copy link

I had same problems, same log file, I resolved it in 2 steps:
1.deleting "node_modules" directory in project
2.npm install
after that npm start was working like charm :)
I hope this will resolve your issues as well

@WhaSukGO
Copy link

rm -rf node_modules/
npm install

It works! If anyone is using Yarn, the error persists if you reinstall the package using Yarn. After installing the packages using npm, it worked! Thank you!

@bryanSME
Copy link

npm update worked for me. not sure which dependency was causing it but everything is fine now.

@waqargithub
Copy link

What fixed it for me:

I ran npm update as suggested by @bryanSME. It seems I had a different issue. This time when I ran npm start, I saw that there was an ENOSPC error (it may have been there before and I might have not noticed it). I see that @ardf69 also mentions this error.

Searching for ENOSPC took me to this thread. Using the first command in the selected answer (I am not using Arch Linux so I ignored the second and third command) fixed it for me.

@ryzhevichs
Copy link

ryzhevichs commented Jan 20, 2020

Also the problem may be caused by existing warnings.

I have such error during npm run build "Treating warnings as errors because process.env.CI = true. Most CI servers set it automatically. Failed to compile"

Get rid of warnings or set this variable to false

@Amirjab21
Copy link

Still no answer to this, I'm having the same problem...

@michielauerbach
Copy link

I ran into the exact same problem all of a sudden.

Yesterday everything was fine, this morning, without doing anything. Poof.... :-s

npm ci
remove node_modules and npm install

updated npm and node

Untill I updated NPM to the latest version and node to the latest version
Logged out of the system, logged in again and solved..

@haiflive
Copy link

haiflive commented Apr 6, 2020

ok, I just forgot create config file that was ignored in .gitignore (.\src\configs\config.js) and also got the same error.
mb helpful somebody

@diogo23perkin
Copy link

I removed the node_modules
run the "npm install"

And now it works.

@Daotin
Copy link

Daotin commented Jul 1, 2020

I found that my hosts file was lost, but my npm run dev was not localhost but relocated in hosts, then I created a new hosts, and it was fine after that.

@fnu11
Copy link

fnu11 commented Jul 17, 2020

@mamedshahmaliyev
Copy link

So, after spending ridiculous amount of time trying to solve the issue (generally all the steps that I've found were involving reinstalling dependencies in one way or another) I've found the answer.

It turns out that the latest node.js issue has some issues with Windows and the only way to fix this for me was to download previous version. I've downloaded it from:

https://nodejs.org/en/download/releases/

the version that fixed it for me was Node.js 10.x

Quick and painless (almost)

I hope that this will help someone who will be stuck with a similar issue...

https://stackoverflow.com/questions/58648120/npm-err-code-elifecycle-starting-issue

@marcell93
Copy link

In my case I solved it with more RAM

@JasonLiuLiuLiuLiu
Copy link

i also solved it with relase more memnory space, thank you @marcell93

@NeuronButter
Copy link

On a different note, I was trying to implement the server-renderer, but I forgot to install it with NPM. I have no idea why Node didn't tell me that a missing dependency was the problem, and why it gave that ridiculous error, but I literally solved it by running npm install --save @vue/server-renderer. Really dumb, I know, but check if your dependencies are correctly installed.

@LuisGalicia
Copy link

I solved this problem deleted all dependencies from package.json & package-lock.json. Then run npm install.

@rixment
Copy link

rixment commented Feb 28, 2021

What helped in my case was the following:

npm cache clean --force
rm -rf node_modules/
npm install

EDIT:
Actually the problem yet again popped up on me... and this time I've closed several browser instances that were opened on my machine (freed up some system memory) and build it again this time without a problem.

@servetgulnaroglu
Copy link

What did work for me was to close the editor and reopen it.

@MSA1012
Copy link

MSA1012 commented Nov 29, 2021

The NPM run test is faulty;NPM Run Prod is fine;queer
`$ npm run test

vue3-admin@0.1.0 test C:\Users\Administrator\Desktop\project\blinds_pos_admin
vue-cli-service build --mode test

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating

/ Building for test...

ERROR Failed to compile with 3 errors

error in ./src/views/goods/price-set-f/index.vue?vue&type=script&lang=js&

Module parse failed: Unexpected token (1306:51)
File was processed with these loaders:

  • ./node_modules/cache-loader/dist/cjs.js
  • ./node_modules/babel-loader/lib/index.js
  • ./node_modules/cache-loader/dist/cjs.js
  • ./node_modules/vue-loader/lib/index.js
    You may need an additional loader to handle the result of these loaders.
    | let store_name = ""; //门店name
    |
    data.commodity_module.selection.store_data?.forEach(item => {

| if (item.id === data.commodity_module.selection.store_value) {
| store_name_or_id = item.id + "-" + item.name;

@ ./src/views/goods/price-set-f/index.vue?vue&type=script&lang=js& 1:0-298 1:314-317 1:319-614 1:319-614
@ ./src/views/goods/price-set-f/index.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi ./src/main.js

error in ./src/views/finance/SoDepositList/index.vue?vue&type=script&lang=js&

Module parse failed: Unexpected token (234:47)
File was processed with these loaders:

  • ./node_modules/cache-loader/dist/cjs.js
  • ./node_modules/babel-loader/lib/index.js
  • ./node_modules/cache-loader/dist/cjs.js
  • ./node_modules/vue-loader/lib/index.js
    You may need an additional loader to handle the result of these loaders.
    | //获取SO定金清单数据列表
    | async getSoDepositList() {
  let storeIds = this.selectedStoreIdArray?.filter(item => item != "全选");

| let params = {
| fromDate: this.form.fromDate,

@ ./src/views/finance/SoDepositList/index.vue?vue&type=script&lang=js& 1:0-298 1:314-317 1:319-614 1:319-614
@ ./src/views/finance/SoDepositList/index.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi ./src/main.js

error in ./src/views/goods/price-set-list-f/index.vue?vue&type=script&lang=js&

Module parse failed: Unexpected token (871:51)
File was processed with these loaders:

  • ./node_modules/cache-loader/dist/cjs.js
  • ./node_modules/babel-loader/lib/index.js
  • ./node_modules/cache-loader/dist/cjs.js
  • ./node_modules/vue-loader/lib/index.js
    You may need an additional loader to handle the result of these loaders.
    | storeEndPickerOptions: {
    | disabledDate(time) {
      let date = new Date(data.storeDialogData?.startStr).getTime();

| return time.getTime() < date - 86400000;
| }

@ ./src/views/goods/price-set-list-f/index.vue?vue&type=script&lang=js& 1:0-298 1:314-317 1:319-614 1:319-614
@ ./src/views/goods/price-set-list-f/index.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi ./src/main.js

ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue3-admin@0.1.0 test: vue-cli-service build --mode test
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue3-admin@0.1.0 test 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! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2021-11-29T10_25_43_701Z-debug.log 0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v14.15.1
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle vue3-admin@0.1.0pretest: vue3-admin@0.1.0
6 info lifecycle vue3-admin@0.1.0
test: vue3-admin@0.1.0
7 verbose lifecycle vue3-admin@0.1.0test: unsafe-perm in lifecycle true
8 verbose lifecycle vue3-admin@0.1.0
test: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Administrator\Desktop\project\blinds_pos_admin\node_modules.bin;C:\Program Files\PowerShell\7;D:\Java\jdk1.8.0_261\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\WINDOWS\System32\OpenSSH;C:\Users\Administrator\AppData\Local\Android\Sdk\platform-tools;C:\Users\Administrator\AppData\Local\Android\Sdk\tools;C:\Program Files (x86)\NetSarang\Xshell 7;C:\Users\Administrator\Desktop\apache-maven-3.8.3\bin;C:\Program Files\PowerShell\7;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\AppData\Local\Android\Sdk\platform-tools;
9 verbose lifecycle vue3-admin@0.1.0test: CWD: C:\Users\Administrator\Desktop\project\blinds_pos_admin
10 silly lifecycle vue3-admin@0.1.0
test: Args: [ '/d /s /c', 'vue-cli-service build --mode test' ]
11 silly lifecycle vue3-admin@0.1.0test: Returned: code: 1 signal: null
12 info lifecycle vue3-admin@0.1.0
test: Failed to exec test script
13 verbose stack Error: vue3-admin@0.1.0 test: vue-cli-service build --mode test
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid vue3-admin@0.1.0
15 verbose cwd C:\Users\Administrator\Desktop\project\blinds_pos_admin
16 verbose Windows_NT 10.0.22504
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "test"
18 verbose node v14.15.1
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error vue3-admin@0.1.0 test: vue-cli-service build --mode test
22 error Exit status 1
23 error Failed at the vue3-admin@0.1.0 test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
`

@sahin52
Copy link

sahin52 commented Jun 13, 2022

You may need to install latest version of react-scripts:
npm i react-scripts@latest

@sviluppatori-input
Copy link

Ciao a tutti, spero in un vostra illuminazione. Anche a me viene fuori un errore simile quando faccio la build, ma solo lato client. Ho già provato a eliminare i node_modules e package-lock.json per poi fare npm install ma non ho risolto nulla. Avete qualche altro consiglio?
Premetto che fino a una settimana fa non mi dava nessun problema e l'unico pacchetto installato nel mentre, è stato html2pdf... Che però non mi causa alcun problema lato server e neanche quando faccio npm start...

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@1.4.0 buildDemo: concurrently "cd ./client && npm run buildDemo --production" "cd ./server && npm run buildDemo --production"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@1.4.0 buildDemo 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! /home/niccolovaccina/.npm/_logs/2023-10-20T07_35_05_029Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/niccolovaccina/.nvm/versions/node/v14.18.1/bin/node',
1 verbose cli '/home/niccolovaccina/.nvm/versions/node/v14.18.1/bin/npm',
1 verbose cli 'run',
1 verbose cli 'buildDemo'
1 verbose cli ]
2 info using npm@6.14.15
3 info using node@v14.18.1
4 verbose run-script [ 'prebuildDemo', 'buildDemo', 'postbuildDemo' ]
5 info lifecycle project@1.4.0prebuildDemo: project@1.4.0
6 info lifecycle project@1.4.0
buildDemo: project@1.4.0
7 verbose lifecycle project@1.4.0buildDemo: unsafe-perm in lifecycle true
8 verbose lifecycle project@1.4.0
buildDemo: PATH: /home/niccolovaccina/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/niccolovaccina/Projects/projects/project/node_modules/.bin:/home/niccolovaccina/.nvm/versions/node/v14.18.1/bin:/home/niccolovaccina/.local/bin:/home/niccolovaccina/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
9 verbose lifecycle project@1.4.0buildDemo: CWD: /home/niccolovaccina/Projects/projects/project
10 silly lifecycle project@1.4.0
buildDemo: Args: [
10 silly lifecycle '-c',
10 silly lifecycle 'concurrently "cd ./client && npm run buildDemo --production" "cd ./server && npm run buildDemo --production" '
10 silly lifecycle ]
11 silly lifecycle project@1.4.0buildDemo: Returned: code: 1 signal: null
12 info lifecycle project@1.4.0
buildDemo: Failed to exec buildDemo script
13 verbose stack Error: project@1.4.0 buildDemo: concurrently "cd ./client && npm run buildDemo --production" "cd ./server && npm run buildDemo --production"
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/home/niccolovaccina/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:400:28)
13 verbose stack at ChildProcess. (/home/niccolovaccina/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:400:28)
13 verbose stack at maybeClose (internal/child_process.js:1058:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
14 verbose pkgid project@1.4.0
15 verbose cwd /home/niccolovaccina/Projects/projects/project
16 verbose Linux 6.4.13-200.fc38.x86_64
17 verbose argv "/home/niccolovaccina/.nvm/versions/node/v14.18.1/bin/node" "/home/niccolovaccina/.nvm/versions/node/v14.18.1/bin/npm" "run" "buildDemo"
18 verbose node v14.18.1
19 verbose npm v6.14.15
20 error code ELIFECYCLE
21 error errno 1
22 error project@1.4.0 buildDemo: concurrently "cd ./client && npm run buildDemo --production" "cd ./server && npm run buildDemo --production"
22 error Exit status 1
23 error Failed at the sosta-online@1.4.0 buildDemo script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author
Projects
None yet
Development

No branches or pull requests