LOCALCODEPILOT / PRACTICAL GUIDE
Port 3000 already in use on Windows: how to fix it
Errors such as EADDRINUSE or “address already in use” can mean another process is listening on the requested port. Identify the application before stopping any process. These examples use TCP port 3000; replace it with the port from your error.
1. Find the listening process
Open PowerShell and run:
Get-NetTCPConnection -LocalPort 3000 -State Listen -ErrorAction SilentlyContinue |
Select-Object LocalAddress, LocalPort, OwningProcessOwningProcess is the PID. IPv4 and IPv6 entries can belong to the same process. An empty result means no TCP listener was found on this port at that moment; the process may have stopped or the error may have another cause.
2. Inspect the PID
Replace 12345 with the PID you found:
Get-Process -Id 12345 | Select-Object Id, ProcessName, PathIf needed, inspect the command line to distinguish servers sharing a process name:
Get-CimInstance Win32_Process -Filter "ProcessId = 12345" |
Select-Object ProcessId, Name, CommandLineSome details may require additional permissions. Review command lines for credentials before sharing them.
3. Stop a known service or choose another port
For your own development server, prefer Ctrl+C in its original terminal or the owning application's stop action. If you do not recognize the process, leave it running and configure another port.
For a project using Vite through its dev script, one example is:
npm run dev -- --port 3001This option depends on the command behind the script; it is not a universal npm option. Update frontend URLs, API URLs and callbacks as needed.
As a last resort for your own identified process, PowerShell can request confirmation before stopping it. This may discard ongoing work and does not replace a normal service shutdown:
Stop-Process -Id 12345 -Confirm
4. Check again
Repeat the first query and restart your project. If the service reappears, check for a supervisor restarting it. If the port is free but the error persists, review the full log, bind address and application configuration.
Keep processes, ports and logs together
LocalCodePilot brings projects together and helps you follow processes, alternative ports and logs for supported services. This keeps context available when switching projects. In Alpha 7, container operations require command confirmation.
Get started with LocalCodePilot on Windows.
Command references: Get-NetTCPConnection, Get-Process and Stop-Process.
Download Windows alpha