Fix Node “port already in use” / EADDRINUSE
Updated 2026-09-28
Direct answer
EADDRINUSE means another process is already listening on the TCP port your Node app wants (often 3000, 5173, or 8080). Find that process with `lsof -iTCP:<port> -sTCP:LISTEN` (macOS/Linux) or `netstat -ano | findstr :<port>` (Windows), then stop it — or use PortSnap to see the process name, PID, and working directory and Kill with confirmation.
What EADDRINUSE means
Node’s listen() failed because the address is already bound. A typical message:
Error: listen EADDRINUSE: address already in use :::3000
The number after ::: (or in 0.0.0.0:PORT) is the TCP port you need to free —
often 3000, 5173 (Vite), 8080, or whatever process.env.PORT is set to.
Fix it on macOS / Linux
lsof -nP -iTCP:3000 -sTCP:LISTEN
kill <PID>
Replace 3000 with the port from the error. Details:
free port 3000 on Mac.
Fix it on Windows
netstat -ano | findstr :3000
taskkill /PID <PID> /F
Confirm the row shows LISTENING before you kill — and that the PID is your leftover
Node process, not an unrelated system service.
Fix it with PortSnap
- Open PortSnap from the tray and locate the port in the error.
- Read the process name and working directory — confirm it is the leftover server.
- Kill, or Kill + Restart with the project’s saved start command.
Project identity uses process + folder, so two apps that both use :3000 stay separate. Download · Features · $29 once.
Prevention tips
- Stop the previous
npm run devwith Ctrl+C in the same terminal before starting again. - Avoid orphaned background jobs (
&, forgotten tmux panes). - If you must run two apps, set distinct
PORTvalues instead of fighting for 3000.
FAQ
- What does Error: listen EADDRINUSE :::3000 mean?
- Node tried to bind TCP port 3000, but another process is already listening there. Free that port or start your app on a different PORT.
- Should I change the port or kill the old process?
- If the old process is a leftover from the same project, kill it. If another tool legitimately uses that port, set PORT to something else. PortSnap’s project memory helps you restart the right repo instead of guessing.
- Does PortSnap fix EADDRINUSE automatically?
- PortSnap does not change your code. It shows what holds the port and lets you Kill or Kill + Restart with a saved start command so you can bind again quickly.