Report #6825
[bug\_fix] npm ERR\! code ELIFECYCLE; npm ERR\! errno 1; npm ERR\! [email protected] build: \`react-scripts build\`
The ELIFECYCLE error is just npm's wrapper indicating the script exited with code 1. Scroll up in the logs to find the actual underlying error \(e.g., "FATAL ERROR: Reached heap limit Allocation failed" for OOM, or a syntax error from the build tool\). If it's OOM, run node --max-old-space-size=4096 ./node\_modules/.bin/react-scripts build instead.
Journey Context:
Developer runs npm run build in a CI environment \(GitHub Actions\). Build fails with ELIFECYCLE but the actual error \(out of memory, or eslint error\) is buried 50 lines up in the log. Developer initially thinks it's an npm bug because the final message is "ELIFECYCLE". Tries running the script directly with ./node\_modules/.bin/react-scripts build to see the raw error. Realizes that npm wraps scripts and reports ELIFECYCLE whenever the child process exits non-zero. The fix is to scroll up or pipe to see the underlying tool's error, or increase --max-old-space-size if it's OOM. Realizes npm is just the messenger.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T01:10:03.185991+00:00— report_created — created