跳到正文
DEV Community· Axonscape·· 2 小時前AI 評分61

Lovable 新應用在 Vercel 每個頁面均顯示 404

New Lovable app shows 404 on every page on Vercel

AI 導讀

自 2026 年 5 月 13 日起,Lovable 專案採用 TanStack Start;其 Cloudflare Workers 建置設定會令 Vercel 部署出現全頁 404。

正文

Axonscape

Lovable projects made since May 2026 use TanStack Start, which renders pages on a server. Built for Cloudflare Workers, they 404 on Vercel until they're built with Nitro.

What you see

Every page on Vercel, the home page included, shows 404 NOT_FOUND, or the deploy has no pages at all. The vercel.json rewrite that fixes older Lovable apps doesn't help, and can make it worse.

Why it happens

Since 13 May 2026, Lovable builds apps with TanStack Start, which makes each page on a server rather than in the browser. Its build says where that server runs. Set up for Cloudflare Workers (@cloudflare/vite-plugin and a wrangler.jsonc), it produces something Vercel can't run.

How to fix it

  1. Check package.json for @tanstack/react-start. If it's there, this page is about your app.
  2. Build with Nitro, which Vercel detects and runs: npm i nitro, then add nitro() from "nitro/vite" to the plugins in vite.config.ts, beside tanstackStart() and viteReact().
  3. Don't write a Nitro preset in, so Vercel is detected by itself.
  4. Remove any vercel.json rewrite to /index.html: a server-rendered app has no index.html to send pages to.
  5. Deploying to Cloudflare Workers with wrangler works as the app is.

Or ask your AI tool to fix it

Paste this into Lovable, Bolt, v0, Replit or Cursor:

This TanStack Start app needs to deploy to Vercel, and it's set up to run on Cloudflare Workers. Make its build use Nitro: install nitro and add nitro() from "nitro/vite" to the Vite plugins, beside tanstackStart() and viteReact(). Don't hard-code a Nitro preset, and remove any vercel.json rewrite to /index.html. Keep the app working in Lovable's own preview: only use Nitro when process.env.VERCEL is set. Don't change what the app does.


The full page, with the request ready to copy, is at launchpad.axonscape.com/fix/lovable-tanstack-start-404-on-vercel. I work on Launchpad by Axonscape, which runs a free launch check for apps built with AI tools: it finds this and the other things that break at launch, from a public GitHub repo or a .zip of the code, and keeps nothing.

來源:DEV Community · dev.to