Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
maulberto3 opened this issue Jul 12, 2018 · 31 comments
Closed

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

maulberto3 opened this issue Jul 12, 2018 · 31 comments

Comments

@maulberto3
Copy link

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?

@remy
Copy link
Owner

remy commented Jul 12, 2018

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

@Akallabet
Copy link

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

@remy
Copy link
Owner

remy commented Jul 12, 2018 via email

@tuanzijiang
Copy link

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.

@Akallabet
Copy link

@remy it is 130 indeed :)
@sumAlbert nodemon@debug (1.18.2-alpha.1) fixes the problem also when running nodemon from npm script

@tuanzijiang
Copy link

tuanzijiang commented Jul 12, 2018

@Akallabet Maybe it is related to project. I run two different projects with npm script. One is ok, the other is 130. nodemon@debug (1.18.2-alpha.1)

@Akallabet
Copy link

Akallabet commented Jul 12, 2018

@sumAlbert definitely possible, btw I'm running

node@10.6.0
npm@6.1.0

Hope it helps

remy added a commit that referenced this issue Jul 13, 2018
Fixes #1389
Fixes #1390
Ref #1386

Means that ctrl^l does not instantly clear the terminal. It requires a
new line directly after.
remy added a commit that referenced this issue Jul 13, 2018
Fixes #1389
Fixes #1390
Ref #1386

Means that ctrl^l does not instantly clear the terminal. It requires a
new line directly after.
@DiegoRBaquero
Copy link

Having this issue in 1.18.3

@subatomicglue
Copy link

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

@rozquit
Copy link

rozquit commented Aug 7, 2018

I have this issue in 1.18.3 too!

@divillysausages
Copy link

Can confirm this issue is still present in 1.18.4

@Adverbly
Copy link

Upgrading to 1.18.5 seems to have fixed this for me.

@VictorKolb
Copy link

Having this issue in 1.18.6

@kuzmicheff
Copy link

Updating to 1.18.7 has solved this issue for me.

@PseudoCowboy
Copy link

PseudoCowboy commented Jan 18, 2019

Having this issue in 1.18.9

@goddtriffin
Copy link

Also having this issue in 1.18.9

@MickL
Copy link

MickL commented Feb 13, 2019

@remy Please reopen!

@jesusvallez
Copy link

1.18.10 :(

@lacek
Copy link

lacek commented May 23, 2019

Still having the same issue on 1.19.0 ☹️

@bharathgrk
Copy link

1.19.1 ☹️

@meszaros-lajos-gyorgy
Copy link

It is not likely, that it will be fixed anytime soon: #1424 (comment)

@remy
Copy link
Owner

remy commented Jun 18, 2019

Pretty amazed by the ratio of "still happening" to PRs on this particular issue! 😄

@meszaros-lajos-gyorgy
Copy link

meszaros-lajos-gyorgy commented Jun 19, 2019

Hi everyone!

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

nodejs/node#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.

@Tolga-FNT
Copy link

Tolga-FNT commented Jul 22, 2019

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

@meszaros-lajos-gyorgy
Copy link

[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.

@rishikesh67
Copy link

rishikesh67 commented Aug 14, 2019

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?

Thank you very much. It works.

How I reached here: I googled nodemon ctrl c not working and clicked on 3rd link after trying 1st link(failed).

@evantahler
Copy link

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

@borracciaBlu
Copy link

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.

@remy
Copy link
Owner

remy commented Dec 18, 2020

@borracciaBlu best to track the git blame on that line. The project is coming up on 10 years old and there's so many tiny changes for specific systems to make it all hang together I can't recall why but I'm sure it's there on purpose. It's not the kind of copy you'd see in copy/paste mistake.

@abdouakhad
Copy link

npm install -g nodemon@debug

This one that Remy made, fixes the problem for me

@thiagoolsilva
Copy link

@abdouakhad thanks for your reply. After changing the nodemon version 2.0.7 to 2.0.14-alpha.1 the problem was fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests