keep getting "? Something is already running on port 3000" when I do npm start on react app
Solution 1
If you are a windows user you can try using
npx kill-port 3000
in your console. I was having the same problem and it worked for me.
Not sure about MAC.
Solution 2
Open cmd and write this
netstat -a -o -n
You will get list of active connections then find 3000 by hitting
Cntrl + f
Copy the PID of that port and hit this command
taskkill /F /PID PID_of_port
Edit This guide is for windows.
Solution 3
Kill Node.Js
process from Task Manager.
Step 1: Open Task Manager by clicking ctrl+shift+delete
Step 2: Open Prcesses tab
Step 3: Search for Node.JS process and right click on that then click on End Task
Step 4: Now you can start again.
Solution 4
As @khurram khan suggested terminating the process may be the best option for you, This work for me on linux:
$ lsof -i tcp:3000
$ kill -9 PID
the first command should give you the PID number to enter in the second command as PID.
Solution 5
I had this problem on Mac and I solved by running:
npx kill-port 3000
Admin
Updated on January 20, 2022Comments
-
Admin over 2 years
I keep on getting "? Something is already running on port 3000" message in my terminal when I start up my react server when there is absolutely nothing running on my port 3000
What I have tried to solve with:
- Restart the macOS.
- checking my "http://localhost:3000" on chrome browser. (Nothing: This site can’t be reached)
- Go to chrome://serviceworker-internals and chrome://appcache-internals, search for localhost:3000 (Nothing found)
- I also tried almost every command lines I found on Google regarding this issue
- I also created another express.js app, and it was successfully launch on port 3000 while React said there is something running on 3000. React on my computer just keeping thinking there is something running on port 3000.