The Prompt BakeryTemplates and prompts

Fix · Vercel and deploying

My API route works locally but returns 404 or fails on the live site

Not checked against the vendor's current screens

What you may see

  • fetch to /api/... works on my computer but not online
  • The site is a static export, so the API does not exist

Most likely cause

The live site does not run the server code at that address: a static export, a wrong folder for the route, or a method (GET versus POST) that the route does not handle.

Check first (about two minutes)

  1. Open the full address of the route in a browser tab: do you get 404, 405 or a real answer?
  2. Check if the project is exported as static files (look for output: "export" or a static host setting).

The fix prompt

What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.

Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.

Prompt language

Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.

After you tried it, did it work?

Steps

  1. Check where the route file is and its exact name and exported method (GET, POST).
  2. Check the framework setting for static export and whether server code is allowed in this project's host setup.
  3. Fix the one cause found and show me a curl command that tests the route.

Do not do this

  • Do not put secret keys into a static page to avoid the route.
  • Do not move the whole site to another host to fix one route.

Related

Try another entry

How can we help?

What do you need?
Your email, so we can reply (optional)Only enter your own email. We reply there.