Fix "Port Already in Use" / EADDRINUSE / localhost Refused
Last updated: March 16, 2025
Fix port conflicts when starting dev servers. Find and kill the blocking process, change ports for React/Next/Vite/Django/Flask/Docker, and prevent zombie processes.
Overview
Dev server won't start because the port is taken? This guide shows how to find and kill the blocking process, switch ports for any framework, and prevent it from happening again.
What this helps with
What to expect: Easy difficulty • usually about 2 minutes.
This is one of 28 Developer Tools & Programming fixes in the WindowsHelper library. The full step-by-step fix for this is in the WindowsHelper app.
Coming soon in the app
The full step-by-step fix for this is in the WindowsHelper phone app — coming soon, no price announced yet. The free PC Companion (available now) is the piece that connects your phone to your PC.
🔔 Get notified at launchRelated fixes in Developer Tools & Programming
-
🤖 Configure Android Development
Set up Android Studio on Windows with a fast emulator, SDK tools and app signing, and fix ADB connection problems and Gradle build errors.
Medium30-45 minutes -
🗄️ Database Development Setup
Set up SQL Server, MySQL, PostgreSQL or MongoDB for development on Windows, add a database GUI, run databases in Docker and fix connection errors.
Medium45-60 minutes -
🐳 Configure Docker on Windows
Install Docker Desktop with WSL 2, set resource limits, build images, run Compose projects, configure networking and fix Docker Desktop that won't start.
Medium45-60 minutes -
🔧 Configure Git and Version Control
Install Git on Windows, set your identity, connect to GitHub or GitLab with SSH keys or Credential Manager, and fix SSL, line-ending and path errors.
Medium45-60 minutes -
⚙️ Fix VS Code Configuration
Set up VS Code on Windows: install it, add language and Git extensions, adjust settings, fonts and themes, and customize or reset keyboard shortcuts.
Medium45-60 minutes -
🐍 Fix Python Development Environment
Fix Python on Windows: see which Python runs, remove the fake python shortcut, repair PATH, fix pip, SSL and import errors, and set up virtual environments.
Medium30-45 minutes -
🛠️ Fix Visual Studio Installation Issues
Fix Visual Studio installer failures, component errors, and corrupted installations. Covers repair tool, clean uninstall, offline installer, and workload management.
Medium45-60 minutes -
🛠️ Fix Web Development Tools
Set up web development tools on Windows: browsers for testing, local dev servers, trusted HTTPS on localhost, CORS errors and browser DevTools.
Medium45-60 minutes -
🐧 Fix Windows Subsystem for Linux
Install and fix WSL: enable the feature, add a Linux distribution, fix install errors, set WSL 2 limits, solve network and DNS problems, speed up file access.
Medium45-60 minutes -
🔧 .NET Framework Issues
Fix framework SDK and runtime problems on Windows: check what is installed, install or repair the runtime an app needs, clear NuGet caches and fix build errors.
Medium45-60 minutes
You might also run into
-
⚙️ Configure POP3 and IMAP Settings
Set up manual email server connections with POP3 and IMAP protocols including port and SSL configuration
Medium30-45 minutes -
Set Up WSL2 Development Environment
Configure a complete Linux development environment in WSL2 with VS Code integration, Git, SSH, Node.js, Python, and Docker.
Medium15-45 minutes