remy / nodemon

Monitor for any changes in your node.js application and automatically restart the server - perfect for development
http://nodemon.io/
MIT License
26.35k stars 1.74k forks source link

Error : listen EADDRINUSE: address already in use #2233

Closed udhayakumarcp closed 1 month ago

udhayakumarcp commented 1 month ago

Expected behaviour

The application should run

Actual behaviour

Facing the address in use error

image

Steps to reproduce

Satvik1769 commented 1 month ago

have you tried restarting your computer, may be there is an instance running beforehand so you would have to kill it before trying to run again on same port

udhayakumarcp commented 1 month ago

have you tried restarting your computer, may be there is an instance running beforehand so you would have to kill it before trying to run again on same port

I tried lsof. Also, it is not working even I chnage the ports to listern lsof -i tcp COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME node 5486 udhayakumar 23u IPv4 40887 0t0 TCP *:3001 (LISTEN) code-384f 25910 udhayakumar 9u IPv4 305639 0t0 TCP localhost:37065 (LISTEN) code-384f 25910 udhayakumar 12u IPv4 304746 0t0 TCP localhost:37065->localhost:35124 (ESTABLISHED)

ravin00 commented 1 month ago

I think some different address is already running in the terminal i think that's the issue. So if you basically have the localhost to run on the port 3000 it should run their but since the port 3000 is already running that's why the the localhost is running on 3001

udhayakumarcp commented 1 month ago

I think some different address is already running in the terminal i think that's the issue. So if you basically have the localhost to run on the port 3000 it should run their but since the port 3000 is already running that's why the the localhost is running on 3001

I tried with ports 3000, 3001, 3002, 3003, 3004, 3005.

udhayakumarcp commented 1 month ago

have you tried restarting your computer, may be there is an instance running beforehand so you would have to kill it before trying to run again on same port

Restarting is worked.