404 Error but Works Fine Locally

Hello I am currently struggling to debug the 404 issue. I’ve already:

  • uploaded my ENV urls (i.e. Database URL from Neon Server, API Key - also tried pushing to Heroku first)
  • removed any mention of local files
  • isolated to single endpoint call in frontend
  • committed most recently changes
    Yet I’ve consistently been having the 404 error since deployment although that it runs successfully locally.

I’m stumped and not sure where to go next.

I’ve been reading posts that require a .tsx which I don’t see either locally nor remotely and I have a project.json folder in my .vercel but no vercel.json.

If anyone or a staff member could help me, I’d really appreciate it and would motivate me so much!

1 Like

There’s another community post with 404 debugging tips that might be helpful. Please give these solutions a try and let us know how it goes.

A human should be around soon to offer more advice. But you can also get helpful information quickly by asking v0.

I can see that your app were deployed successfully. You can access files here for example: https://craivings.vercel.app/code/data/clean/all_data.json.

You can get started with Next.js FastAPI Starter to understand how frontned and backend Python API code needs to form for Vercel deployment.

1 Like

Hi Swarnava, does it have to be exactly the same template? The frontend and backend seem to run well locally so I’m a bit confused what went wrong here since it also successfully deployed.

Somewhere yes, for example, your python code always need to be within /api folder, otherwise it won’t work

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.