How to fix Error: listen EADDRINUSE while using nodejs?

前端 未结 30 4001
执念已碎
执念已碎 2020-11-22 06:44

If I run a server with the port 80, and I try to use xmlHTTPrequest i get this error: Error: listen EADDRINUSE

Why is it problem for nodejs, if I want t

30条回答
  •  感动是毒
    2020-11-22 06:52

    Your application is already running on that port 8080 . Use this code to kill the port and run your code again

    sudo lsof -t -i tcp:8080 | xargs kill -9
    

提交回复
热议问题