Report #15132
[bug\_fix] npm ERR\! code ELIFECYCLE npm ERR\! errno 1
Run the npm script command directly \(e.g., ./node\_modules/.bin/webpack or npx webpack\) to see the actual underlying error output, rather than npm's wrapper. Or check npm-debug.log / .npm/\_logs for the full error.
Journey Context:
You run npm run build and get 'npm ERR\! code ELIFECYCLE' with 'errno 1'. The error message is useless - it just says the build script failed. You try deleting node\_modules and reinstalling, but it still fails. You check the npm-debug.log but it's huge and confusing. You realize that npm is swallowing the actual error output from the underlying command \(webpack, tsc, etc.\). Instead of running 'npm run build', you run './node\_modules/.bin/webpack --mode production' directly. Now you see the actual error: 'Module not found: Error: Can't resolve './missing-file''. The ELIFECYCLE error was just npm's way of saying 'the child process exited with code 1', hiding the real diagnostic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:16:35.317757+00:00— report_created — created