hi all i used to work on MERN
project for sometime but now my react
app wont run on localhost:3000
. So far i tried the following
node.js
/ reinstalled node.js npx create-react-app
but still localhost:3000
isn't workingI checked if port is opened or not using netstat -aon
but localhost:3000
wasn't there. But 0.0.0.0:3000
is there. So my attempt to run telnet 127.0.0.1 3000
was not successful.
Am using windows 10
OS and latest version of nodejs
create .env file at the root of your project and add this line:
PORT = 3000
Then npm start again
Try the solution from this topic.
In package.json edit next string from this
"start": "react-scripts start"
to this
"start": "set PORT=3000 && react-scripts start"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With