# Lovable TanStack Start app: build succeeds on Vercel, then every route is 404: NOT_FOUND

- Fix ID: APP-33
- Exact error: `404: NOT_FOUND`
- Status: As reported (not yet reproduced) (CI: pending, no CI results exist yet)
- Last verified: not yet (as reported)
- Platforms: Lovable, Vercel
- Versions: reported_on=Lovable projects built on TanStack Start (@lovable.dev/vite-tanstack-config), deployed to Vercel; zero_config_requires=@lovable.dev/vite-tanstack-config ^2.6.2 or higher (per Vercel docs); latest_on_npm_oct_30_2026=2.27.0; tested_by_us=not yet reproduced
- Repro: none yet
- Canonical: https://stucktoshipped.com/fixes/lovable/tanstack-start-vercel-404-not-found/

## In brief
Newer Lovable projects are server-rendered (TanStack Start), so the classic SPA rewrite doesn't apply. The full fix covers the version requirement in Vercel's Lovable doc, the redeploy steps, and a community fallback.

> **As reported, not yet reproduced.** We have not deployed a Lovable TanStack Start app to Vercel ourselves. The full fix is based on Vercel's official Lovable doc and one community write-up, both linked under Sources.

## Symptom
You connect a recent Lovable project to Vercel. The build log is green, but opening the site (or any route) shows Vercel's:

```
404: NOT_FOUND
Code: NOT_FOUND
ID: <region>::<request-id>
```

Adding the usual "rewrite everything to `/index.html`" `vercel.json` doesn't help.

## Why it happens
- **Newer Lovable projects aren't plain single-page apps any more.** Their `vite.config.ts` uses `@lovable.dev/vite-tanstack-config`, which sets up **TanStack Start**, a server-rendered framework. The SPA rewrite trick from [the classic 404-on-refresh fix](/fixes/netlify/page-not-found-on-refresh/) doesn't apply.
- **Vercel needs a server build it recognises.** Vercel's Lovable doc says Lovable uses **Nitro** (the server toolkit behind TanStack Start on Vercel) and deploys "with zero configuration", but only from a certain version of `@lovable.dev/vite-tanstack-config`. An older version is a likely cause of the 404 (our inference).
- The config package's own comment (quoted in the dev.to write-up and an Oct 2026 comment on it) says it builds with Nitro using Cloudflare as the default target.

## What we could not test
- A real Vercel deployment (no account yet).
- Lovable's own generated project and editor behaviour.

## Full fix (paid)
The step-by-step fix, commands and test record are paid content and are not in this file. Price: $4 per fix (planned launch price; checkout not open yet). SHA-256 of the full fix: 60599758a2fa7a270aabc8040fb7463432b5fd3cafd4b90163adcec3e1605335. How to buy: https://stucktoshipped.com/pricing/ and https://stucktoshipped.com/products.json

## Sources
- [Vercel docs: Deploy a Lovable app on Vercel](https://vercel.com/docs/integrations/lovable)
- [dev.to: I spent 3 hours debugging a Vercel 404 on my Lovable app (May 2026)](https://dev.to/malik_sohaib_iqbal/i-spent-3-hours-debugging-a-vercel-404-on-my-lovable-app-heres-what-fixed-it-5ele)
- [r/lovable: Has anyone deployed Lovable's new TanStack Start app?](https://www.reddit.com/r/lovable/comments/1tvqpp3/has_anyone_deployed_lovables_new_tanstack_start/)
- [npm: @lovable.dev/vite-tanstack-config](https://www.npmjs.com/package/@lovable.dev/vite-tanstack-config)

## How this page was made
Drafted by an AI agent from official docs and public reports. Not yet reproduced. No warranty; test on a copy first.
