Common causes
- The script itself failed — look at the lines above ELIFECYCLE for the actual error
- A build tool (webpack, tsc, babel) encountered a compilation error
- A test suite had failing tests
- A required environment variable or config file is missing
How to fix it
- Scroll up in your terminal to find the actual error before the ELIFECYCLE line
- Run the underlying command directly to see unfiltered output
- Check if all required environment variables are set
- Run npm run <script> -- --verbose for more detailed output
Example
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `webpack --config webpack.config.js`
npm ERR! Exit status 1
npm ERR! Failed at the [email protected] build script.Running npm run build when webpack encounters a module resolution error
Have a different error?
Paste any error message into the Error Translator to get an instant explanation.
