How to kill all node process in your Angular/Node.JS App?
You might be aware of EADDRINUSE
node error in node.js application. Where it says address is in use. This is very annoying. It happenes if some of the ports are still being in used even though you think they are not. What I do is I create a stop script in my node application and I call stop to stop all of the existing node processes.
Error: listen EADDRINUSE 127.0.0.1:8888
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at Server.setupListenHandle [as _listen2] (net.js:1355:14)
at listenInCluster (net.js:1396:12)
at doListen (net.js:1505:7)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Kill all Node Process
One option that I prefer to kill all node processes. Be aware that when you do this all of the existing node processes will stop.
How to stop node process in windows?
"stop": "taskkill /f /im node.exe",
How to stop node process in Mac?
"stop": "killall node",