Lovable app deploys to Vercel successfully but every route returns 404
404: NOT_FOUNDA Lovable project builds green on Vercel and then 404s on every route. The cause is a build-target change Lovable shipped around 20 April 2026, not anything wrong with the project.
Symptom
The Vercel build log completes successfully. The deployment goes live. Every route, including the index, returns 404. Nothing in the build output indicates a problem.
Why it happens
Lovable apps used to ship as client-only React, which made them invisible to Google - the well-known 'Google sees an empty div' problem. Lovable fixed that around 2026-04-20 by moving new projects to TanStack Start with SSR built in. That fix changed the build target to a Nitro preset aimed at Cloudflare Workers. Vercel is looking for a build output that the project no longer produces. An SEO fix created a deploy failure. This connection is not documented anywhere by either vendor.
Fix
Set the Nitro preset to Vercel in vite.config.ts. Install nitro, then add the nitro/vite plugin with preset 'vercel':
import { defineConfig } from '@lovable.dev/vite-tanstack-config';
import { nitro } from 'nitro/vite';
export default defineConfig({
tanstackStart: { server: { entry: 'server' } },
vite: { plugins: [ nitro({ preset: 'vercel' }) ] },
});
SECOND, SEPARATE GOTCHA: Lovable re-bumps '@lovable.dev/vite-tanstack-config' in package.json (reported 1.4.0 -> 2.3.1), which breaks Vercel builds again with either build errors or a fresh 404. At least one user pins it back to 1.4.0 manually after every bump. Check the installed version before assuming the preset fix failed.