sz

Sejan

Blog

Solve NODEJS Error: bind EADDRINUSE HOST:PORT

Home › Problem & Solutions › Solve NODEJS Error: bind EADDRINUSE HOST:PORT
Share
Solve NODEJS Error: bind EADDRINUSE HOST:PORT
 When in development of a node app and you're using this issue mostly appears that time and when the server crashes unexpected or crashes or you accidentally killed the terminal window. it gets hard to restart the server again. It can be fixed two easy commands in linux system First open a terminal in your linux system. N.B: my examples are based on debian based in the terminal type first this command
lsof -Pi :PORT
Note that param Pi is case sensative. this with return you the process id i.e: PID for the PORT you were runnign the Node app. in my case PID is 31713 Copy the PID and type
sudo kill -9 PID

in my case

sudo kill -9 31713
provide your root password. if the command runs correctly you'll be able to run nodemon or you node app on the port.

Comments (0)

Leave a Reply ↓

No comments yet. Be the first to start the discussion!

Leave a Comment