skip to content
shipanjodder.com

How to stop process localhost currently using port

Updated:

The issue “Something is already running on port 3000” arises when a service (like your React application) tries to start on port 3000, but another process is already using that port.

Steps to Fix

  1. Identify and Kill the Process Using Port 3000

For Windows:

  1. Open the command prompt and type:
cmd
netstat -ano | findstr :3000

This will display the process ID (PID) using port 3000.

  1. Terminate the process by PID:
cmd
taskkill /PID <PID> /F

Replace <PID> with the actual PID from the previous command.

For macOS/Linux:

  1. Find the process using port 3000:
bash
lsof -i :3000
  1. Terminate the process:
bash
kill -9 <PID>

Replace <PID> with the actual PID from the previous command.

  1. Check for Running Processes If the issue persists, ensure no orphan processes are left running:
  • Restart your system to clear any lingering processes.
  • Check for running Node.js processes:
bash
ps aux | grep node

Terminate any unwanted processes using kill -9 <PID>.