I am using the command nodemon
, and the first time I do so, localhost serves all the files correctly. However, when I make any changes, or when I quit out of nodemon(ctrl + c) and run nodemon again, I get this error:
events.js:182
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::3000
at Object._errnoException (util.js:1019:11)
at _exceptionWithHostPort (util.js:1041:20)
at Server.setupListenHandle [as _listen2] (net.js:1344:14)
at listenInCluster (net.js:1385:12)
at Server.listen (net.js:1469:7)
at Function.listen
(D:\Apps\NodeJs\Test\node_modules\express\
lib\application.js:
618:24)
at Object.<anonymous>
(D:\Apps\NodeJs\Test\app.js:95:5)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
[nodemon] app crashed - waiting for file changes before starting...
I noticed in my processes, that Node.js:Server-side Javascript
is running, even though I have killed my nodemon
process. When I simply run node app.js
, I don't have an issue. I understand that the port is already being used to serve my files, hence this error, but I'm not sure why escaping out of nodemon
doesn't kill the process and free up the port again?