how to release localhost from Error: listen EADDRINUSE

前端 未结 28 2170
孤独总比滥情好
孤独总比滥情好 2020-11-28 17:53

i am testing a server written in nodejs on windows 7 and when i try to run the tester in the command line i get the following error

Error: listen EADDRINUSE
         


        
28条回答
  •  悲&欢浪女
    2020-11-28 18:37

    This works on Mac:

    Step 1.

    sudo lsof -i tcp:3000 (or whatever port you want to kill)
    

    Above command will give you the Process Id(s) currently holding the port.

    Step 2.

    Kill -9 
    

提交回复
热议问题