question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Babel-watch not killing the app on SIGINT

See original GitHub issue

babel-watch v2.0.7

Action: Spawn babel with node, then try to kill it with SIGINT. Expected: The app should be killed Current: The app is not kill and the child process is running

Context: I was spawning a babel-watch on a app to start my server with a webpack-dev-middleware, and when I sent a signal to babel-watch to kill it, the webpack watchers continued running. When restarting the babel-watch process, I got a EADDRINUSE which lead me to spot this bug.

Solution: In babel-watch.js, add killApp() when receiving SIGINT signal.

process.on('SIGINT', function() {
  watcher.close();
  killApp();
  process.exit(1);
});

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:17 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
STRMLcommented, May 19, 2020

Thanks @aaroncraigongithub.

This was fixed in https://github.com/kmagiera/babel-watch/commit/e02dcc7b57d14a32e8f8726a9f2f600ed941c2fc, many months ago, but I do not have npm access so I am unable to publish. @kmagiera, I have asked a few times, could you please add me to npm publishers for babel-watch?

1reaction
STRMLcommented, Oct 20, 2021

Great. Published in 7.6.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

having a problem with setting up my babel-watch in node.js
npm ERR! Failed at the t3@1.0.0 dev-start script. npm ERR! This is probably not a problem with npm. There is likely additional logging ......
Read more >
Debug Node.js Apps using Visual Studio Code
The Visual Studio Code editor includes Node.js debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >
How to stop the node.js inspector / Chrome Debugger on ...
eg: if my package.json has "dev": "app develop" in its script section and I normally run that with yarn dev on the commandline....
Read more >
@babel/core | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
How to use the nodemon function in nodemon - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues ... Ensure stopping our parent process...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found