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?
Did you try increasing memory available for docker via Docker > Preferences... > Advanced > Ram. It defaults to only 2 GB (on mac).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With