You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[1.7.0] ng serve not properly killed on CTRL+C with yarn/npm #9647
Yeah I saw that on a SO answer and tried several variations, including ctrl + Z, etc. This was never an issue prior to updating from Angular CLI 1.5 to 1.6.8. Regular 'ol ctrl + c would stop everything. Now it just drops back to a command prompt and leaves 2 processes running. One for ng and one for an sh ng ... that runs the actual webserver. It's just aggravating. I ended up adding another command to my package.json called kill and set it to sudo lsof -t -i tcp:443 | xargs kill -s 9 (my app runs on SSL, sub 443 for whatever port you're using). Still would be great to find a way to make this work like it used to.
To temporary workaround this issue you can remove line 382 from node_modules/@ngtools/webpack/src/angular_compiler_plugin.js. This line should have process.once('SIGINT', handleParentProcessExit);.
Reacted by Nariman Mandi, ClementVidal, Brayan Jesús Salcedo, Tomohiro (Tomo) SHIOYA, Kevin Jones-Evans, coffeetea-synchestra, Daniel Ramírez and Morris Franken
Reacted by Saiyaff Farouk
Reacted by Martin Simoneau, Metod Ribič, Brayan Jesús Salcedo, Kevin Jones-Evans and coffeetea-synchestra
Reacted by Nicolas Leblanc, Martin Simoneau, Brayan Jesús Salcedo and coffeetea-synchestra
fwiw ... #9668 refers to this issue using ng serve --aot. I'm seeing this happen with just a regular ng serve and wanted to make sure that was accounted for in the other thread. Thanks!
Activity
victornoel commentedon Feb 16, 2018
Note that the problem happens both on windows and linux
dottodot commentedon Feb 16, 2018
I'm seeing this too. Having to resort to running
sudo lsof -t -i tcp:4200 | xargs kill -9before serving againjtsom commentedon Feb 16, 2018
Also appears on OS X. two Control-C to kill the server.
switch120 commentedon Feb 16, 2018
Oh my god this is the worst - same issue here. Anyone find a fix? So aggravating. Running CLI v1.6.8, Ubuntu 16.04LTS vagrant VM.
MattMorrisDev commentedon Feb 16, 2018
I see this too, but it only happens when I use yarn to run my npm scripts. (OS X btw)
athulreji commentedon Feb 17, 2018
Try
ctrl + shift + cswitch120 commentedon Feb 17, 2018
Yeah I saw that on a SO answer and tried several variations, including
ctrl + Z, etc. This was never an issue prior to updating from Angular CLI 1.5 to 1.6.8. Regular 'olctrl + cwould stop everything. Now it just drops back to a command prompt and leaves 2 processes running. One forngand one for ansh ng ...that runs the actual webserver. It's just aggravating. I ended up adding another command to mypackage.jsoncalledkilland set it tosudo lsof -t -i tcp:443 | xargs kill -s 9(my app runs on SSL, sub 443 for whatever port you're using). Still would be great to find a way to make this work like it used to.fix(@angular/cli): shut down after first Ctrl+C received
sinedsem commentedon Feb 19, 2018
+1
Very annoying!
Thanks God I noticed this before upgrading my main project.
fix(@angular/cli): shut down after first Ctrl+C received
devoto13 commentedon Feb 19, 2018
To temporary workaround this issue you can remove line 382 from
node_modules/@ngtools/webpack/src/angular_compiler_plugin.js. This line should haveprocess.once('SIGINT', handleParentProcessExit);.fix(@angular/cli): shut down after first Ctrl+C received
fix(@angular/cli): shut down after first Ctrl+C received
fix(@angular/cli): shut down after first Ctrl+C received
4 remaining items
esanzgar commentedon Feb 20, 2018
killall ngfix(@angular/cli): shut down after first Ctrl+C received
fix(@angular/cli): shut down after first Ctrl+C received
switch120 commentedon Feb 21, 2018
fwiw ... #9668 refers to this issue using
ng serve --aot. I'm seeing this happen with just a regularng serveand wanted to make sure that was accounted for in the other thread. Thanks!devoto13 commentedon Feb 21, 2018
@switch120 It should fix it without
--aotas well.fix(@angular/cli): shut down after first Ctrl+C received
fix(@angular/cli): shut down after first Ctrl+C received
angular-automatic-lock-bot commentedon Sep 7, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(@angular/cli): shut down after first Ctrl+C received