Receive Error Message - Listen to EADDRINUSE: 3000 on a Windows Computer

I searched a lot and I understand that there is some process or server on port 3000, but how can I stop this and start a new http express server on port 3000. There are several answers that report this for Unix environment .. but how to free port in Windows environment using cmd terminal. Closing a task using PID also did not help me. thanks in advance

+6
source share
4 answers

Open a command prompt and enter the following command

netstat -a -o -n 

run the list by port until you find port 3000 and you see the process ID. Then run

 taskkill /F /PID (yourprocessID) 

there is another easy way to do this in one command

 FOR /F "tokens=4 delims= " %%P IN ('netstat -a -n -o ^| findstr :3000') DO TaskKill.exe /PID %%P 

if you use Windows 7 U, you may need tokens=5 , use tokens with caution for different OS.

+6
source
  • In Windows 10, open the task manager and go to the Details tab.
  • There you will find node.exe .
  • Complete this task and your port will be freed.
+3
source

EADDRINUSE means that there is another running process that listens on the port that your node application wants to use and reserve. Most likely, you started the application earlier, but it did not finish correctly and is still holding on to the port. so first we finish the already running, and then start another new server

0
source

This is because port 3000 is already busy listening to another process. so just go to the task manager and terminate this process / delete all related node js processes.

0
source

Source: https://habr.com/ru/post/1014173/


All Articles