Software⏱️ 2 min read📅 2026-05-31

How to Fix: How to fix Error: listen EADDRINUSE while using NodeJS?

NodeJS uses a socket server to listen for incoming connections, but it cannot listen on port 80 simultaneously with another process using the same port.

Quick Answer: Try listening on a different port or use a reverse proxy server to forward requests from port 80 to your NodeJS server.

Error: listen EADDRINUSE occurs when a server is attempting to bind to an address and port that is already in use by another process or service.

🛠️ Step-by-Step Verified Fixes

Method 1: Use a Different Port

  1. Step 1: Change the port number in your server code to a value that is not already in use.

Method 2: Use Node's Built-in Server

  1. Step 1: Create a new server instance using the built-in HTTP module.

💡 Conclusion

By following these steps, you should be able to resolve the Error: listen EADDRINUSE issue when using NodeJS and make requests to a server running on port 80.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions