ERROR: code ELIFECYCLE npm ERR! errno 134
Asked Answered
P

4

18

To download the necessary modules(MSS), navigate with the terminal to the local folder on which the repository has been cloned by launching:

npm install

then I try to build the I project with:

npm run build-dev

but I get this error:

npm ERR! code ELIFECYCLE 
npm ERR! errno 134 
npm ERR! [email protected] build-dev: `gulp build --env node` 
npm ERR! Exit status 134 
npm ERR!
npm ERR! Failed at the [email protected] build-dev script. 
npm ERR! This is probably not a problem with npm. There is likely

additional logging output above.

why?

Penhall answered 16/1, 2020 at 9:49 Comment(2)
check with solution https://mcmap.net/q/54949/-how-to-solve-npm-error-quot-npm-err-code-elifecycle-quotFloaty
I have already tried clearing the cache and clearing and reinstalling the node folder and "package" files but nothingPenhall
S
13

This issue happens due to the memory issue, it could be any one of the npm packages.

export NODE_OPTIONS="--max-old-space-size=8192"

This command increases the memory limit. Execute this command in a terminal, before using npm start (It is for windows, check for an equivalent in other platforms)

Storer answered 3/12, 2020 at 10:48 Comment(3)
Please don't post only code as answer, but also provide an explanation what your code does and how it solves the problem of the question. Answers with an explanation are usually more helpful and of better quality, and are more likely to attract upvotes.Llovera
This issue happens due to the memory issue, it could be any one of the npm packages. Above command increases memory limit. Execute this command in a terminal, before using npm start (It is for windows, check for an equivalent in other platforms)Storer
If you are on Windows, the "export" word might not be recognized, so use "set". set NODE_OPTIONS="--max-old-space-size=8192"Has
L
3

Another Fix could be that, you installed the wrong Version of Nodejs!! I had the same issue, and raising the memory limit did not solve the issue at all. By uninstalling Node und installing the x64 Version the issue was gone. Reason was, that Nodejs.org was suggesting to install the x86 version 🤦‍♂️.

Laporte answered 10/5, 2021 at 11:42 Comment(1)
You could use n to manage your vesion of Node.js github.com/tj/n on macOS, LinuxPompidou
S
1

If you are building the image using Dockerfile, try using the buster images. In my case node:18.19.0 doesn't work, but node:18.19.0-buster worked properly.

P.S. (Dockerhub): For finding the LTS buster version of node image, check this link.

P.S. (Github): For more information about the root cause of this problem, check this Github issue.

P.S. (Docker): If you are curious the difference among the various image tag names, check this Stackoverflow answer.

Strohl answered 24/1 at 23:1 Comment(0)
G
0

I received the same error when trying to run the project with a different version of nodejs. In my case, I was using nvm-windows and there were two different versions of nodejs installed (10.15.0 and 12.18.3).

After removing them and having installed the correct version, the ng serve command started working again.

You could check if your nodejs version is the same of your project or maybe remove node_modules folder and them run npm install again.

Gennygeno answered 24/3, 2021 at 22:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.