Reputation: 181
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?
Upvotes: 18
Views: 34474
Reputation: 6736
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.
Upvotes: 1
Reputation: 1121
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 🤦♂️.
Upvotes: 3
Reputation: 1
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.
Upvotes: 0
Reputation: 161
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)
Upvotes: 13