Babel-watch not killing the app on SIGINT
See original GitHub issuebabel-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:
- Created 5 years ago
- Reactions:6
- Comments:17 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
?Great. Published in
7.6.0
.