Lovable or Bolt app broken after export to GitHub: Lovable preview to GitHub to deploy flow with a deploy log showing a lockfile mismatch, VITE_SUPABASE_URL undefined, a 404 on refresh and a sign-in redirect to localhost, then live after the fix

Lovable or Bolt App Broken After GitHub Export? Fix (2026)

Your app works perfectly in the Lovable or Bolt preview. You connect GitHub, import the repo into Vercel, Netlify or another host, hit deploy, and get a failed build, a blank white page, a 404 on every refresh, or a sign-in button that bounces users back to localhost. Nothing in your code changed. So what broke?

When a Lovable app broken after export (or a Bolt app) fails on a new host, the code is almost never the problem. The builder’s preview quietly supplies things GitHub doesn’t carry: environment variables, a server runtime, routing rules, secrets and approved sign-in URLs. Once the code runs somewhere else, each of those has to be set up again. This guide shows you which one is missing and gives you the copy-paste fix. Just want the standard deploy steps? See how to deploy a Lovable app first, then come back here if something breaks.

Quick answer: An app that breaks after export to GitHub is usually missing one of six things on the new host: the right stack setup (Lovable projects created since May 13, 2026 use TanStack Start and need a server), Node 22 and a matching lockfile, the VITE_SUPABASE_* env vars at build time, a routing fallback, Supabase redirect URLs, or server secrets.

What you seeMost likely causeCheckFix
Build fails on installLockfile and package manager mismatch, or wrong Node versionBuild log: npm ci or bun install errorOne lockfile, commit it, pin Node 22
Build fails: nitro or output directory errorsTanStack Start project on an old build configpackage.json for nitro and @lovable.dev/vite-tanstack-configUpdate the config package, keep nitro installed
Blank white pageMissing VITE_SUPABASE_URL or key at build timeBrowser console errorsAdd env vars on the host, then redeploy
404 when you refresh a pageOlder Vite app with no index.html fallbackOpen a nested URL directlyAdd the SPA rewrite for your host
404 or errors on server pagesTanStack Start app deployed as static filesIs the host running server code?Deploy to a host that runs the server
Sign-in redirects to localhost or failsNew URL not in Supabase redirect allow listAuth, URL ConfigurationSet Site URL and redirect URLs
Payments, emails or API calls failServer secrets never left the builderServer or function logsAdd secrets to the host or Supabase
Your fix disappears after the next promptTwo-way sync overwrote itGitHub commit historyCommit fixes to the synced branch

Want it fixed for you? Launch Mango moves your Lovable, Bolt, v0 or Cursor app onto your own GitHub, Supabase and Vercel accounts, live at a real URL. Own Your App is $79 one-off, usually done in 1 to 2 days, with money back if it isn’t live on your accounts. Own and Secure ($199) also fixes sign-in and redirects, Supabase RLS, exposed keys and live Stripe payments. Not sure what’s broken?