I built a website using React, Node.js, MongoDB, Tailwind. Everything was running fine. I restarted my laptop and when I un npm start, it just says "Server running on HTTP://localhost:5002" and "connected to MongoDB", but the application never starts on localhost:3000.
I have been trying for hours to figure out whats going on but I just can’t. I don’t have any errors either because the code works fine like I said. Any help please!
2
Answers
To resolve your issue, you can try the following steps:
Run the React development server: Navigate to the React project folder and run
npm start
to confirm the frontend is starting.Check for port conflicts: Ensure the frontend is running on
http://localhost:3000
and the backend onhttp://localhost:5002
. If port 3000 is in use, stop it usingnpx kill-port 3000
and restart.Verify proxy in React: In the React package.json, confirm
"proxy": "http://localhost:5002"
is set to route API requests correctly.Reinstall dependencies: Delete node_modules in both frontend and backend folders, run
npm install
, and start the servers again.If the issue persists, check the browser’s developer console and network tab for errors.
To resolve your issue, you can go through this:
Try to delete node_moudles folder, and then run
npm install
in your project terminal. It will reinstall your dependencies of the project.Try to use other browesers or clear the cache of your current browser.
Hope it helps you!