I downloaded a repo of a react app from github and installed all the necessary dependencies. Then in ran npm start which started the dev server on localhost:3000. While on this port the app is showing a blank page but if I run the dev server on a different port like localhost:3001, it works fine but I need it to run on localhost:3000.
I searched for the solution on google and tried every single solution possible to fix this issue, but nothing is solving it.
How do I make my app work on localhost:3000 rather than other ports?
Remove the explicit PORT argument from your scripts in package.json
looks something like this
"start": "PORT=3001 react-scripts start"
or if there's an env file containing the port Variable?
remove it.
make sure you are not running multiple react apps, that will make your app use another port if the default port is busy.
leme know if it fixies the issue if not .. please link to the repo you are using.