Report #53563
[bug\_fix] npm ERR\! code ELIFECYCLE; npm ERR\! errno 1; npm ERR\! [email protected] build: \`react-scripts build\`; npm ERR\! Exit status 1
Run the failing script directly without npm to see the real underlying error: \`./node\_modules/.bin/react-scripts build\` or \`npx react-scripts build\`. Alternatively, run \`npm run build --verbose\` to see full output above the ELIFECYCLE line. Fix the underlying tool error \(syntax error, missing environment variable, out of memory\). If caused by corrupted npm cache, run \`npm cache clean --force\`. The root cause is that npm masks the underlying tool's exit code with its own ELIFECYCLE wrapper, and the actual error appears earlier in logs which may be truncated in CI.
Journey Context:
Developer runs \`npm run build\` in CI and gets ELIFECYCLE. The error is masked by npm's error logging showing npm's own error code rather than the underlying tool's error. Developer tries clearing cache, deleting node\_modules, but persists. Eventually running the script directly \(\`./node\_modules/.bin/react-scripts build\`\) reveals the actual error: 'Module not found: Error: Can't resolve './MissingComponent'' or 'SyntaxError: Unexpected token'. Fixing the actual code error resolves the ELIFECYCLE wrapper error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:24:04.175213+00:00— report_created — created