EADDRINUSE node server_error ai_generated true

Error: listen EADDRINUSE: address already in use :::3000 (next dev)

ID: node/next-dev-port-conflict

Also available as: JSON · Markdown
95%Fix Rate
95%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
20 active

Root Cause

Next.js dev server port already in use. Another instance or process on port 3000.

generic

Workarounds

  1. 95% success Kill existing process: lsof -i :3000 and kill the PID
    lsof -ti :3000 | xargs kill -9

    Sources: https://nextjs.org/docs/api-reference/cli

  2. 90% success Use a different port: next dev -p 3001
    next dev -p 3001

    Sources: https://nextjs.org/docs/api-reference/cli#development

Dead Ends

Common approaches that don't work:

  1. Change to a random port each time 55% fail

    Inconsistent URLs during development

Error Chain

Frequently confused with: