I have a WEB app written in React and whenever I try to run it with react-app-rewired start
it complains that Something is already running on port XYZ
.
I've checked if any process is listening on port XYZ with netstat -a -b
, but there was none. Also, if I change port XYZ to any 4 digit value (with environment variable PORT=3001
), I'll always get the same problem, that the port is already taken, so I'm concluding that port is not taken but something is going on down under. I'm running on Windows 10 with Node 12 Installed (I tried downgrading to node 10 because I think this used to work for me on lower node version, but I couldn't get it working anymore).
I've searched the web and most of them suggest checking if port is taken, few other I found are bellow but didn't work for me:
react-scripts
to ^2.1.8
https://github.com/facebook/create-react-app/issues/7061Did anyone had similar problems and was able to resolve them?
It turns out it was Hyper-V taking all the ports....After disabling Hyper-V I was able to run node app on port 3000.
Workaround for this issue is to reserve ports while Hyper-V is turned off:
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
netsh int ipv4 add excludedportrange protocol=tcp startport=3000 numberofports=1
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
References: