Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve npm run build 137 error? Already have set 10gb

I am running npm run build to create a docker. It has --prod option. If ran without --prod it builds fine. If built with --prod it goes into 137 ENDLIFECYCLE error.

Killed npm ERR! code ELIFECYCLE npm ERR! errno 137

Unfortunately i can't just remove the prod option, cos thats what works on dev machine and I am just supposed to be doing devops.

I saw many places that its because of memory low, so i set the variable NODE_OPTIONS --max-old-space-size

It is at 10GB currently and it is not helping. And i can build same docker in my machine with 8GB.

This build is happening inside jenkins and i did a free -m inside docker just to see, the server has 64GB memory.

So what could be the issue?

like image 747
manu muraleedharan Avatar asked Oct 20 '25 19:10

manu muraleedharan


1 Answers

Did you try increasing memory available for docker via Docker > Preferences... > Advanced > Ram. It defaults to only 2 GB (on mac).

like image 175
Fariman Kashani Avatar answered Oct 22 '25 11:10

Fariman Kashani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!