Report #88778
[bug\_fix] npm ERR\! code ELIFECYCLE npm ERR\! errno 1 npm ERR\! [email protected] build: \`webpack --mode=production\`
Run the failing script command directly \(e.g., ./node\_modules/.bin/webpack --mode=production\) to see the actual error output and stack trace, or add --verbose to npm run, or check for missing environment variables \(like NODE\_ENV or API keys\) that the build script expects.
Journey Context:
Developer is in a CI/CD pipeline \(Ubuntu Docker container\) and the build step fails with ELIFECYCLE. The npm log shows the build script failed with exit code 1 but the actual webpack error is truncated or buffered. Developer tries npm run build --verbose but the output is still buried in npm's error formatting. They realize npm swallows stdout/stderr when scripts fail in certain CI environments. They cd into the directory and run ./node\_modules/.bin/webpack --mode=production directly. This immediately shows 'Module not found: Error: Can't resolve './MissingComponent''. They fix the import path, commit, and CI passes. The ELIFECYCLE was just npm's wrapper around the real build error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:35:59.903837+00:00— report_created — created