Loading...
Loading...
Error: listen EADDRINUSE: address already in use :::3000Your Node.js server is trying to listen on a port that's already in use by another process. This commonly happens when a previous server process didn't shut down cleanly.
Find and kill whatever is using the port.
# Mac / Linux — find the process
lsof - ti: 3000 | xargs kill - 9
# Windows(PowerShell)
netstat - ano | findstr : 3000
# Then kill the PID shown
taskkill / PID<PID> / FChange your server to listen on a different port.
// In your server code
const PORT = process.env.PORT || 3001; // change 3000 to 3001
app.listen(PORT, () => console.log(`Server on port ${PORT}`));Nuclear option — kill all running Node.js processes.
# Mac/Linux
pkill -f node
# Windows
taskkill /F /IM node.exe