Quickly free up a busy port and restart your server without wasting time debugging.
If you see an error like "Port 3000 is already in use", it means another process is using that port.
On Mac or Linux, run:
lsof -i :3000
This will show the process ID (PID). Then kill it:kill -9 <PID>
On Windows, run:netstat -ano | findstr :3000
Then kill the process:taskkill /PID <PID> /F
Alternatively, you can start your app on a different port:PORT=3001 npm start
This issue usually happens when a previous server process did not shut down properly. Always stop your server cleanly using Ctrl + C.
More 1-Min Fixs
Fix “Too Many Re-renders” Error in React
This error happens when your component keeps updating state inside render, causing an infinite loop.
⚡Fix API Calls Running Twice in React Strict Mode
React Strict Mode can call effects twice in development. Add a guard or make your API action idempotent.
⚡Fix “map is not a function” Quickly
This usually happens when you think a value is an array, but it is actually undefined, null, or an object.
Get a new 1-Min Fix in your inbox
Subscribe to Stack Dev Life — free, no spam, unsubscribe anytime.
Subscribe free →