Report #78241
[bug\_fix] npm ERR\! code ELIFECYCLE npm ERR\! errno 1
Scroll up in the logs to find the actual error output from the underlying command \(above the npm ERR\! lines\), fix that specific error \(syntax error, missing env var, build failure\), or increase memory limits if it's an OOM. Root cause: ELIFECYCLE is npm's generic exit code wrapper indicating that a lifecycle script defined in package.json \(build, test, start\) exited with a non-zero status code. The actual error is whatever caused the script to fail, which npm logs immediately before the ELIFECYCLE summary.
Journey Context:
You run npm run build in your CI pipeline or locally. The output ends with a red block saying 'npm ERR\! code ELIFECYCLE' and 'npm ERR\! errno 1'. You focus on the ELIFECYCLE part and search Google, finding generic advice to delete node\_modules and reinstall. You do that, same error. You try clearing npm cache, upgrading npm, switching Node versions. Nothing works. Eventually, in frustration, you scroll up past the 'npm ERR\!' summary block to see the actual build output above it. You see a specific syntax error: 'SyntaxError: Unexpected token \} in webpack.config.js at line 45', or 'Module not found: Error: Can't resolve 'sass-loader' in ...', or 'FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed'. You realize ELIFECYCLE just means 'the script exited with an error' and the actual cause was always there, hidden above npm's error summary. You fix the syntax error, install the missing loader, or increase Node's max-old-space-size, and the build succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T13:55:27.039776+00:00— report_created — created