Explain EADDRINUSE errors

Paste a Node.js EADDRINUSE error, such as "address already in use :::3000", and Vibe explains it in plain English: which address and port were taken, why the error stopped the server and how to find what holds the port.

eaddrinuse.txt

Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.

Vibe24 lines selected

Press Explain it for the sample, or paste your own code first.

What this EADDRINUSE sample shows

the message
Error: listen EADDRINUSE: address already in use :::3000 means listen asked for port 3000 and something already had it. :::3000 is the address :: followed by the port, and the details at the end say the same with address: '::' and port: 3000. Your own line is in the stack, file:///home/dev/api/server.js:11:8: line 11 is server.listen(PORT, () => {. The run ended with exit code 1.
the unhandled error event
throw er; // Unhandled 'error' event and Emitted 'error' event on Server instance mean the server reported the failure as an error event, and nothing in server.js listened for that event, so Node.js stopped the program. The server never started: API version 2 listening never printed.
who holds the port
lsof -nP -l -iTCP:3000 -sTCP:LISTEN listed one process listening on *:3000, PID 4, and ps -o pid,args for that PID showed what it was: node old-server.js, the older copy still running. After stopping it with kill, node server.js printed API version 2 listening on http://localhost:3000 and answered {"ok":true,"version":"2"}.
another port
Started with PORT=3001 in front, server.js came up too, because it reads the PORT environment variable, and answered on 3001 with "version":"2". But port 3000 still answered {"ok":true,"version":"1"}: anything still pointed at 3000 kept talking to the old code.

Good to know

  • Run with Node.js 25.7.0, npm 11.10.1 and lsof 4.99.7 on Linux in a test folder mounted at /home/dev/api, with a network of its own so nothing else on the machine could hold the port. old-server.js, the same server saying version 1, was started first to stand in for a copy left running in another terminal.
  • npm run dev printed the same error after its > node server.js line. The -l makes lsof print a user ID in place of a login name.

Before you trust it: A fix that moves to the next free port hides the old server. With an error handler that runs port += 1 and listens again on EADDRINUSE, the new server printed API version 2 listening on http://localhost:3001 with no warning, and curl -s localhost:3000 still got {"ok":true,"version":"1"}. Find what holds the port and check its command before you stop it.

Explain EADDRINUSE errors beside your editor

Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).

Install on Mac

curl -fsSL https://unvibe.site/install.sh | bash

Paste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.

No install warning? Use Unvibe in your browser

Opening the .dmg the first time

Unvibe isn't notarized by Apple yet, so macOS blocks the first open until you allow it. Its code is public on GitHub.

  1. Open the .dmg, drag Unvibe to Applications and open it. macOS says it can't verify it. Click Done, not the blue Move to Trash.
    macOS dialog: “Unvibe” Not Opened, with a blue Move to Trash button on top and Done under it
    Real screen, macOS 26. On macOS 15 the two buttons sit side by side.
  2. System Settings › Privacy & Security, scroll down to Security, then press Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.
    macOS Privacy & Security, Security section: Unvibe was blocked to protect your Mac, with the Open Anyway button
    Real screen, macOS 15
  3. Unvibe opens. You only do this once, and later versions install from inside the app with one click.
    Unvibe's first window: Vibe says Hey! I'm Vibe. I explain the code AI writes for you, right beside your editor, over the title Understand the code AI writes
    Real screen, Unvibe 0.1.51 on macOS 26

The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open