How to kill nodemon process on mac?

Viewed 27676

I am having trouble with exiting past nodemon instance.

COMMAND   PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
node    98355 user   14u  IPv6 0x51b8b9857a4e56a3      0t0  TCP *:redwood-broker (LISTEN)

It has taken my 3000 port so I am trying to exit it. I searched it by using lsof -wni tcp:3000

I could see that PID is 98335, so tried kill 98335, kill -9 98335, sudo kill 98335, sudo kill -9 98335 and so on but no luck, it's just saying

kill: kill 98335 failed: no such process

But if I save something, nodemon watching job is printing out to console, which means that process is still alive.

Please help me.

5 Answers

https://github.com/remy/nodemon/issues/1386

To work around the issue, find the proces running on the port number and kill it:

 kill -9 $(lsof -t -i:3000)   

OR

Install 1.17.5 npm install nodemon@1.17.5 --save-dev --save-exact.

to kill all running node processes with -9 option

sudo pkill -f node -9

you kill wrong PID its 98355 not 98335

Related