Report #9843
[bug\_fix] npm ERR\! code ELIFECYCLE npm ERR\! errno 134/137 \(SIGABRT/SIGKILL\)
Increase the Node.js heap size limit by setting the environment variable NODE\_OPTIONS=--max-old-space-size=4096 \(or 8192\) before the build command, or disable source map generation with GENERATE\_SOURCEMAP=false for Create React App builds to reduce memory pressure in CI containers.
Journey Context:
Developer pushes a Create React App or large Webpack project to CI \(GitHub Actions/GitLab CI\), build fails with 'JavaScript heap out of memory' or exit code 137 \(OOMKilled by Docker/Linux cgroup\). Local builds succeed because the developer machine has 16GB RAM while the CI container is limited to 2GB. Attempting to add --max-old-space-size=4096 directly to the npm script fails because npm eats the flag. Researching Node.js CLI docs reveals the NODE\_OPTIONS environment variable passes flags to the Node process. Setting NODE\_OPTIONS=--max-old-space-size=4096 in the CI workflow allows the garbage collector to expand the heap beyond the default ~1.4GB limit, preventing the OOM killer from terminating the build process.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T09:14:33.846775+00:00— report_created — created