Report #5781
[bug\_fix] ELIFECYCLE exit status 1
Scroll up in the logs to find the actual error message from the underlying tool \(webpack, tsc, jest\) that caused the script to exit with code 1, then fix that specific error \(syntax error, missing module, config issue\). If the error persists after fixing the code, delete node\_modules and package-lock.json, clear npm cache with \`npm cache clean --force\`, and reinstall. Root cause is that npm lifecycle scripts are wrappers; when the underlying command exits non-zero, npm reports ELIFECYCLE as a generic container for the actual failure.
Journey Context:
You run \`npm run build\` and see \`npm ERR\! code ELIFECYCLE\`, \`npm ERR\! errno 1\`, \`npm ERR\! [email protected] build: webpack --mode production\`. The actual error \(e.g., "Module not found: Error: Can't resolve './missing'" or "SyntaxError: Unexpected token"\) appears 20 lines above, buried in webpack output. You initially think ELIFECYCLE is the problem and search for it, then realize it's just npm's way of saying "the script failed". You fix the syntax error in your source code and the build succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:11:12.241182+00:00— report_created — created