Nodejs crashes during development cause continuous 'EADDRINUSE: address already in use'. Workaround?

76 views Asked by At

I'm working on a node.js script and it crashes sometimes because it's still in development. Every time this happens though I get an EADDRINUSE error and I have to go ps ax | grep 'node server' and then kill the_pid. This is extremely time consuming. There must be a work around. Is there?

1

There are 1 answers

0
Bassam On

I had nodemon installed globally. I uninstalled the global installation. I installed it as a dev dependency and that appears to have solved the problem; I no longer get the address in use error.