nodemon: ctrl+c stops nodemon server but along errno 130 elifecycle error

Hi. However, ctrl+c after node server.js does exit and stops gracefully (no errno 130 elifecycle).

- node 8.9.4
- nodemon 1.18.1. 

Any solution?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 10
  • Comments: 31 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Please can you try with the current debug version: npm install -g nodemon@debug (1.18.2-alpha.1)

Having this issue in 1.18.9

1.18.10 😦

Can confirm this issue is still present in 1.18.4

Me too, also in 1.18.3, downgraded back to 1.17.5 and ctrl-c exiting works again without LIFECYCLE 130 errors…

Hi @remy sorry to bother you on this again but on /node_modules/nodemon/lib/monitor/run.js@465 we got:

// because windows borks when listening for the SIG* events
if (!utils.isWindows) {
  bus.once('boot', () => {
    // usual suspect: ctrl+c exit
    process.once('SIGINT', () => bus.emit('quit', 130)); <- SIGINT IS ctrl+c!!!!!
    process.once('SIGTERM', () => {
      bus.emit('quit', 143);
      if (child) { child.kill('SIGTERM'); }
    });
  })
}

so now my question is : why do we have process.once('SIGINT', () => bus.emit('quit', 130));? What’s the reason for that because that is the cause of the 130…

!utils.isWindows explains why it is not happening on windows.

If there is no good reason for throwing a 130 to a SIGINT let me know and i’ll PR

Thanks.

Still having the same issue on 1.19.0 ☹️

Technically ctrl-c isn’t a graceful exit, it’s a SIGINT with an exit code of 130 (it’s just somehow the new way I was going it was confusing npm) - you can validate this by checking ctrl-c on npm and echo $?

On Thu, 12 Jul 2018, 10:26 Graziano Statello, notifications@github.com wrote:

Just tried with nodemon@debug (1.18.2-alpha.1) and no more errno 130 elifecycle error, it exits gracefully.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/remy/nodemon/issues/1390#issuecomment-404449824, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA1hLwNFwqo1z5dkxD3md92dfQWXIU-ks5uFxZHgaJpZM4VMPUK .

@remy Please reopen!

I have this issue in 1.18.3 too!

Having this issue in 1.18.3

I also meet this problem today. When I use nodemon in CLI, it’s ok. However, I use npm script to run it, it doesn’t work properly.

npm install -g nodemon@debug

This one that Remy made, fixes the problem for me

If you put some logging in, it looks like the SIGINT actually ends up at your program twice fairly rapidly:

^C2020-09-03T00:34:38.425Z - notice: [ SIGNAL ] - SIGINT
2020-09-03T00:34:38.426Z - notice: stopping process...
[nodemon] still waiting for 6 sub-processes to finish...
2020-09-03T00:34:38.668Z - notice: [ SIGNAL ] - SIGINT
npm ERR! code ELIFECYCLE
npm ERR! errno 130
npm ERR! @grouparoo/app-staging-public@0.1.12-alpha.0 dev: `cd node_modules/@grouparoo/core && GROUPAROO_MONOREPO_APP=staging-public ./api/bin/dev`
npm ERR! Exit status 130
npm ERR!
npm ERR! Failed at the @grouparoo/app-staging-public@0.1.12-alpha.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/evan/.npm/_logs/2020-09-03T00_34_38_811Z-debug.log

[nodemon] 1.19.1 I also have this issue. Still not solved!

Check your node and npm versions and try updating them! There is a good chance, that it will solve the issue for you too.

[nodemon] 1.19.1 I also have this issue. Still not solved!

Hi everyone!

I found a bug ticket on the node github page, which addresses a very similar, if not the same issue:

https://github.com/nodejs/node/issues/21213

I have node 10.4.0 which I’ve updated it to 10.4.1 and seems like it solves the issue. I know, that 10.4.x is not the latest LTS, but it worked for me so far. I’ll check the newer minors too to see, if it is working fine there.

UPDATE: Checked the latest LTS version (10.16.0) and it works fine.

Note to myself: I occasionally get an ELIFECYCLE ERROR 143 upon pressing Ctrl+C, but it is coming from webpack.

@sumAlbert definitely possible, btw I’m running

node@10.6.0
npm@6.1.0

Hope it helps