0

Error: listen EADDRINUSE: address already in use 0.0.0.0:80

code: 'EADDRINUSE', errno: -4091, syscall: 'listen', address: '0.0.0.0', port: 80 getting these error while running the command "npm run env-debug"

how can I resolve these.

  • its because something is already running on this port. Look at your task manager – Steve Tomlin Aug 20 '21 at 08:24
  • use a diff port for debugging purpose. usually in most systems port 80 requires admin/super user privilege. its good to use a diff port like 8080 or 3000/5000 or any port of ur choice – Panther Aug 20 '21 at 09:33

2 Answers2

0

It's because the port 80 is typically reserved for tcp and http communication. Use different ports like 5000, 3000 etc.

See details here Wikipedia port 80

h-sifat
  • 1,455
  • 3
  • 19
0

One of the processes is using port 80. Also, it depends on the OS. Generally, you can not access ports below 1024 without root or admin authorization.

Check which process is using port 80. Most web servers use 80 ports like apache or Nginx.

Windows: Check Ports

Linux: Check Ports

Kill the process using port 80 and you are good to go if you have root privileges.

But, you should never run the node.js app on port 80 with root privileges. It is not recommended to run any server software as root. Run your app on some other port like 80 and use a reverse proxy like Nginx to map it.

Ridham Tarpara
  • 5,970
  • 4
  • 19
  • 39