Error: listen EADDRINUSE: address already in use :::3000
Error: listen EADDRINUSE: address already in use :::3000In one sentence: Something is already running on that port, usually an old copy of your own dev server that never shut down.
What it means
Every web server listens on a port number (3000, 5173, 8080…). Only one program can use a port at a time. EADDRINUSE means the port you're trying to start on is already taken.
Most of the time the 'something' is your own app: a dev server left running in another terminal tab, a crashed process that's still alive, or a second `npm run dev` started by your AI tool.
Common causes
- A previous `npm run dev` is still running in another terminal, tab or editor window.
- A dev server crashed or was closed without stopping the process behind it.
- Your AI agent started the server again without stopping the first one.
- A different app (another project, Docker, AirPlay on macOS for port 5000) is using the same port.
How to fix it
- Check your other terminal tabs and stop any running dev server with Ctrl+C.
- Find what's using the port: on macOS/Linux run `lsof -i :3000`, on Windows run `netstat -ano | findstr :3000`.
- Stop that process: `kill -9 <PID>` on macOS/Linux, or `taskkill /PID <PID> /F` on Windows.
- Or simply start on another port, for example `npm run dev -- -p 3001` for Next.js or `PORT=3001 npm start` for many Node apps.
Example
# macOS / Linux
lsof -i :3000
kill -9 <PID>
# Windows (PowerShell / cmd)
netstat -ano | findstr :3000
taskkill /PID <PID> /F
# or just use another port (Next.js)
npm run dev -- -p 3001Tried this and it's still broken? Paste your exact error for a free explanation of your specific case.
Prompt to paste into your AI tool
My dev server won't start: 'EADDRINUSE: address already in use'. Don't change my code. Give me the exact commands for my operating system to find and stop the process on that port, and make sure you don't start a second dev server while one is already running.Still stuck?
Paste your exact error and code. Get a plain-English explanation free, or the full fix for $5.
Hitting errors every day? Builder is $15/mo for 100 fixes per month. Compare plans
Related errors
- Stripe: No signatures found matching the expected signature for payload
- Next.js Image: hostname is not configured under images in next.config.js
- TypeError: Cannot read properties of undefined
- CORS error: blocked by CORS policy
Weekly: the errors breaking vibe-coded apps and how to fix them. Free.
No spam. Unsubscribe anytime.