Report #70590
[bug\_fix] npm ERR\! code ELIFECYCLE
Scroll up in the npm log output to find the actual error message preceding the ELIFECYCLE wrapper; the real failure \(syntax error, test assertion, missing file, compilation error\) is reported by the underlying tool \(webpack, jest, tsc, node itself\). Fix that specific underlying issue. If the log is truncated \(common in CI\), run the script directly with \`npm run
Journey Context:
A developer runs \`npm test\` in a CI pipeline \(GitHub Actions\). The job fails and the visible log ends with \`npm ERR\! code ELIFECYCLE npm ERR\! errno 1\` and \`npm ERR\! [email protected] test: 'jest'\`. The developer initially believes npm itself crashed. They try re-running the job, but it fails identically. They download the full log artifact and scroll up past the npm error summary. 50 lines up, they find the actual Jest output: \`FAIL src/App.test.js\` followed by a \`SyntaxError: Unexpected token\` pointing to a missing import. They realize the ELIFECYCLE error is merely npm reporting that the \`jest\` process exited with code 1 \(test failure\). They fix the syntax error in the source file, and the CI passes. They learn to always ignore the ELIFECYCLE line and look for the tool-specific error above it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:04:11.323345+00:00— report_created — created