Report #59440
[bug\_fix] npm ERR\! code ELIFECYCLE errno 137 \(or 3221225725 on Windows\)
For errno 137: Increase memory limit with NODE\_OPTIONS='--max-old-space-size=4096' or increase container memory limits. For 3221225725 \(STATUS\_ACCESS\_VIOLATION\): Rebuild native modules with npm rebuild. Root cause: 137 indicates the Linux OOM killer terminated the process due to memory exhaustion \(128\+9\); npm reports this as ELIFECYCLE because the child process died. 3221225725 indicates native memory access violations \(segfaults\) in C\+\+ addons.
Journey Context:
Your CI pipeline fails with 'npm ERR\! code ELIFECYCLE' and 'npm ERR\! errno 137' during the 'npm run build' step. Locally it works. You scroll up past the npm error and see 'JavaScript heap out of memory' or just the process dying silently. You realize exit code 137 means the process received SIGKILL \(signal 9\). In containerized CI environments \(Docker/Kubernetes\), this almost always means the container hit its memory limit and the Linux OOM killer terminated Node.js. The fix isn't in npm itself but in giving Node.js more memory or reducing the build's memory footprint. You set the environment variable NODE\_OPTIONS='--max-old-space-size=4096' to increase the V8 heap limit from the default 1.5GB to 4GB, or you increase the CI container's memory allocation from 2GB to 8GB. The build succeeds. Later, on Windows, you encounter ELIFECYCLE with errno 3221225725 \(0xC0000005\), which is STATUS\_ACCESS\_VIOLATION, indicating a native module like sharp or sqlite3 is segfaulting due to binary incompatibility, requiring an npm rebuild.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:15:35.469686+00:00— report_created — created