0

I am currently getting a 404 in my MERN stack React app on localhost. It was working fine when I left the computer, then when I came back to work on my app, nothing works when trying to login.

While using postman, I am able to login and do just about everything fine. Why would I be getting a 404 in the frontend when I haven't touched anything?

I checked mongodb atlas to see if anything was out of wack, but that wouldn't make any sense if I am able to use postman successfully.

Here is my request error

enter image description here

Christian Baumann
  • 3,188
  • 3
  • 20
  • 37
Erick Bravo
  • 31
  • 1
  • 5
  • 1
    What is your backend URL? Could it be that `http://localhost:3000` is the react dev server? If so how are you making the request? Have you set the proxy field in your package.json? – Palladium02 Mar 16 '23 at 09:16
  • @Palladium02 I believe I fixed the issue for now. My backend URL is http://localhost:5000. I found it odd that the request had 3000 as well. Thanks for pointing me in the right direction to better query a solution. It all started when I deleted my proxy that was set to a random railway deployment that I wasn't using. I set my proxy to 5000 and deleted and reinstalled node_modules/package-lock.json. Referencing this ticket as the solution: https://stackoverflow.com/questions/48291950/proxy-not-working-for-react-and-node – Erick Bravo Mar 16 '23 at 17:37

0 Answers0