Node.jsexit code > 0

EADDRINUSE: address already in use

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

Analysis

The port you are trying to bind to is already being used by another process.

Common Triggers

  • Another instance of your app is already running.
  • A zombie process is holding the port.

Debug Checks

  • $Run lsof -i :<port> or netstat -nlp | grep <port> to find the process.

Resolution

1
Kill the process occupying the port: kill <pid>.
2
Change the port your application listens on.