← All errors · LovableLovable & Bolt app errors
Lovable app shows a blank white page after deploying elsewhere
Exact error
Blank page; console shows errors such as "Failed to load module script" or "supabaseUrl is required"
What it means
Lovable projects are Vite + React apps. When exported to GitHub and hosted on Vercel/Netlify, missing env vars or routing settings commonly produce a blank screen.
Likely causes
- VITE_ env vars not set on the new host.
- No SPA rewrite, so deep links 404 or load wrong assets.
- Wrong build output directory (should be dist).
How to fix it
Open the browser console to see the real error.
Add the env vars (VITE_SUPABASE_URL etc. as used in your code) in the host's settings, then redeploy.
On Vercel, add an SPA rewrite:
// vercel.json { "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }] }Confirm build command `npm run build` and output directory `dist`.
Prevent this next time
- Connect the project to GitHub so every AI edit is versioned and reversible.
- Run `npm run build` locally or in CI before deploying an exported project.
FAQ
What does "Lovable app shows a blank white page after deploying elsewhere" mean?
Lovable projects are Vite + React apps. When exported to GitHub and hosted on Vercel/Netlify, missing env vars or routing settings commonly produce a blank screen.
What usually causes it?
VITE_ env vars not set on the new host. No SPA rewrite, so deep links 404 or load wrong assets. Wrong build output directory (should be dist).
How do I fix it?
1. Open the browser console to see the real error. 2. Add the env vars (VITE_SUPABASE_URL etc. as used in your code) in the host's settings, then redeploy. 3. On Vercel, add an SPA rewrite: 4. Confirm build command `npm run build` and output directory `dist`.
Related errors
Get new fixes weekly
No spam. Unsubscribe anytime. Privacy