Locally okay website is 404 in vercel

Hey I used cursor to build a website app, it works perfectly locally (I start frontend, backend, db separately), but when I deploy to Vercel it has many problems and the most significant is website 404

404: NOT_FOUND
Code: NOT_FOUND
ID: sfo1::p2r5r-1755826011067-ad735a6265a7

I’ve asked multiple AI models about this and made tons of changes but still no luck so far. The latest output screenshot:

and source screenshot:

Any ideas on what should be next? I think i tried to convert backend to serverless func but frontend→backend call also didn’t work..

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.

1 Like

Update: I’m now seeing frontend not found:

My vercel.json is

{
  "version": 2,
  "builds": [
    {
      "src": "frontend/package.json",
      "use": "@vercel/static-build",
      "config": {
        "distDir": "dist",
        "outputDirectory": "."
      }
    },
    {
      "src": "index.js",
      "use": "@vercel/node"
    }
  ],
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }],
  "env": {
    "NODE_ENV": "production"
  }
}

And my directory is

So far I also tried to route to index.html successfully but it still fails to route to my landing page which is frontend/src/pages/landing.jsx..I’m frustrated now

Are you using the monorepo setup recommended in the docs, or a different deployment structure?

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