I have a React app made using create-react-app. I've been running this app without any issues for a few months now but have recently ran into an issue with starting the app because it says the port is in use. Here is the error message: Something is already running on port 3000.
I'm trying to run the app on a Windows 10 machine.
Everything I've tried so far is listed below:
- Running
netstat -an
and checking the output. This shows nothing running on port 3000. - Running
netstat -an | findstr "3000"
. This shows no output. - Running
npx kill-port 3000
. I still get the port in use error message after running this. - Changing port that the app is running on. It doesn't matter which port I choose, it always says the port is in use.
- Checking the Listening Ports list in Resource Monitor shows nothing listening on port 3000
- Restarting my PC
The only thing that works is running the app in a Ubuntu 20.04 VM... which seems to indicate there's something listening on port 3000 on my Windows machine. However, I'm not sure what else I can do to troubleshoot this issue. I'm looking for suggestions on what else I could try.
Edit
Here's the contents of my hosts file C:\Windows\System32\drivers\etc\hosts:
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
# Added by Docker Desktop
192.168.2.115 host.docker.internal
192.168.2.115 gateway.docker.internal
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section