Exit code 130 means your process received SIGINT, usually from pressing Ctrl+C. This is expected behavior when stopping a dev server. If you didn't press Ctrl+C, check for runaway processes or signal handling issues.
Fixes ELIFECYCLE
^C <-- You pressed Ctrl+C
npm ERR! code ELIFECYCLE
npm ERR! errno 130^C <-- You pressed Ctrl+Cnpm ERR! code ELIFECYCLEnpm ERR! errno 130npm ERR! code ELIFECYCLEnpm ERR! errno 130npm ERR! Exit status 130
Exit code 130 (128 + 2) indicates the process received SIGINT—the interrupt signal sent when you press Ctrl+C. In most cases, this is completely expected behavior. When you press Ctrl+C to stop a development server (`npm start`, `npm run dev`), the process receives SIGINT and terminates with exit code 130. npm then reports this as ELIFECYCLE because any non-zero exit triggers that message. This is not really an error—it's the correct behavior for an interrupted process. However, if you didn't press Ctrl+C and see this error, something else is sending SIGINT to your process.
If you pressed Ctrl+C, exit code 130 is correct:
^C <-- You pressed Ctrl+C
npm ERR! code ELIFECYCLE
npm ERR! errno 130This is expected. The process stopped exactly as you requested. npm just reports all non-zero exits as errors.
For development servers, you can safely ignore this message. The server stopped, which is what you wanted.
If it bothers you, you can suppress the error output:
npm start 2>/dev/null || trueTo exit cleanly with code 0 instead of 130:
process.on('SIGINT', () => {
console.log('\nGracefully shutting down...');
// Cleanup code here
process.exit(0);
});This prevents the non-zero exit code.
Puppeteer can intercept SIGINT. Disable it:
const browser = await puppeteer.launch({
handleSIGINT: false
});This prevents Puppeteer from calling process.exit() when you press Ctrl+C.
If CI fails on exit 130 when it shouldn't:
GitHub Actions:
- run: npm start &
- run: sleep 10
- run: kill -2 $! # This will exit 130, which is fine
continue-on-error: trueOr check the exit code explicitly in scripts.
nodemon v1.18.1+ explicitly exits with 130 on SIGINT. If this causes issues:
npm install [email protected] --save-devNote: This is an older version and may have other issues with newer Node.js versions.
Exit 130 vs other signal exits:
- 130 (SIGINT): User interrupt (Ctrl+C)
- 137 (SIGKILL): Forced kill, no cleanup possible
- 143 (SIGTERM): Graceful termination request
On Windows, Ctrl+C may report exit code 2 instead of 130 in native CMD/PowerShell, but WSL and Git Bash will show 130.
If you're seeing exit 130 without pressing Ctrl+C, check:
1. Other terminal tabs/windows that might be sending signals
2. Scripts that use kill commands
3. Process managers that restart processes
4. IDE terminal integrations that might send signals
For production, exit 130 should never occur because you shouldn't be running npm start directly in production—use a process manager or run node directly.