Error: listen EADDRINUSE: address already in use :::3000
Table of Contents
AdSense - In Article Top
If you see the error "listen EADDRINUSE: address already in use :::3000", it means your Node.js server is trying to start on port 3000, but that port is already occupied by another running process.
This usually happens when you restart your server but the old process didn't close properly.
Solution 1: Fix on Windows 🪟
Open your Command Prompt (cmd) and run these commands:
Step 1: Find the Process ID (PID)
netstat -ano | findstr :3000
You will see a list. Note down the number at the end (e.g., 1234).
Step 2: Kill the Process
taskkill /PID 1234 /F
Replace 1234 with your actual PID.
AdSense - In Article Middle
Solution 2: Fix on Mac / Linux 🍎🐧
Open your Terminal and run:
Step 1: Find the PID
lsof -i :3000
Step 2: Kill the Process
kill -9
# Example: kill -9 1234
Solution 3: Quick Fix (NPM) ⚡
If you don't want to run commands manually, you can use npx to kill the port instantly:
npx kill-port 3000
Did this fix your issue? Check out more Node.js solutions in the sidebar.