How to fix Error: listen EADDRINUSE while using nodejs?

前端 未结 30 3231
执念已碎
执念已碎 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:48

    EADDRINUSE means port of your nodejs app is already in use.

    • Now you have kill the process/app running on that port.
    • Find the process id of app by:

    lsof -i tcp:3000

    • Now u will get process id from this.
    • Run this:

    kill -9 processId

提交回复
热议问题