Skip to main content
TypeScript & Node.js · Developer Error Resolution Lab

Fix 'Error: listen EADDRINUSE: address already in use :::3000' in Node.js, Next.js & Vite

Find and kill the process holding port 3000 (or any port) on macOS, Linux, and Windows, or start your dev server on another port.

Triggered Error Message:

Error: listen EADDRINUSE: address already in use :::3000

Customize Solution for Your Environment
# 1. See which process owns port 3000
npx castov port 3000

# 2a. macOS / Linux: kill it
kill -9 $(lsof -t -i:3000)

# 2b. Windows (PowerShell): kill it
Stop-Process -Id (Get-NetTCPConnection -LocalPort 3000).OwningProcess -Force

# 3. Or simply start on another port
PORT=3001 npm run dev      # Next.js / Express
npx vite --port 3001       # Vite

Root Cause & Mechanism Analysis

Why does this error occur?

Another process — usually a previous dev server that did not shut down, a zombie `node` process, or another app — is already bound to the port your server tries to listen on. Only one process can listen on a TCP port per interface.

Frequently Asked Questions

Why does EADDRINUSE happen after I close VS Code?
The integrated terminal can leave a detached `node` process running. Kill it by port (`npx castov port 3000` shows the PID) instead of hunting through Task Manager.
What does ':::3000' mean in the error?
`::` is the IPv6 unspecified address (all interfaces). Node binds to it by default, so the port is busy on every interface.
DEVSECOPS & CI/CD PARTNER2 Slots Open

Need Zero-Knowledge .env Secret Sync Across Your Engineering Team?

Explore Castov Env Vault for client-side AES-256-GCM encrypted environment sharing, or sponsor this engineering hub.

Browse All 69 Guides