EADDRINUSE means another listener already occupies the address and port. It may be an older copy of your app, a development watcher, a Docker port mapping, or another application. Identify it before stopping anything.
On Windows PowerShell, use the commands below to list the process IDs listening on port 3000. Then inspect a returned ID with Get-Process -Id followed by the number. Prefer stopping your own dev server with Ctrl+C in its original terminal. If that terminal is gone, use Stop-Process -Id with the verified ID only when you are sure it is your process. Do not stop every Node process or use a broad force-kill command.
On macOS, and Linux systems with lsof installed, use “lsof -nP -iTCP:3000 -sTCP:LISTEN”. On Linux, “ss -ltnp” is another way to inspect listening sockets. Stop the identified app normally; if needed, send a normal termination signal with “kill PID” for a process you own. Do not immediately jump to kill -9.
Alternatively, choose another port if your application supports it. An environment variable only works when your code or framework reads it. Update the frontend API URL or development proxy if the API port changes.
If the listener immediately returns, check the watcher, process manager or container that restarts it. Node’s error documentation explains EADDRINUSE; Microsoft’s connection command identifies the owning process.
Prepared with AI assistance by Tai. Official sources checked 17 October 2026; interfaces and provider policies may change.
No comments yet.