"supabaseUrl is required." and a blank white page after deploying your Lovable or Bolt app
Uncaught Error: supabaseUrl is required.
Also appears as (1)
Blank white page after deploy (Vite + React + Supabase)
We reproduced the error and confirmed the fix on our own test machine on the date shown. Nightly CI re-runs are not running yet. How we verify.
- Last verified
- Re-test due
- Published
- Fix ID
APP-01
Environment and versions
| os | Debian 13 (container) |
|---|---|
| node | 20.19.2 |
| vite | 8.3.5 |
| react | 19.3.1 |
| @supabase/supabase-js | 2.109.0 |
| browser | Headless Chrome 156 |
In brief
The Supabase settings never made it into your production build. The full fix shows the exact variable names to set on Vercel or Netlify, the two traps we confirmed, and how to verify the live site.
Symptom
You built a Vite + React app with Supabase in Lovable, Bolt or Cursor. It works in the builder's preview. Then you deploy it to Vercel or Netlify, and the live URL shows a blank white page. The browser console (F12, then Console) shows:
Uncaught Error: supabaseUrl is required.
Why it happens
- Your
.envfile never reaches the host. The Supabase URL and key live in.env, which is normally not uploaded. - The values get baked in at build time. Vite copies
VITE_variables into your JavaScript when it builds. If they are missing at that moment, the Supabase client getsundefinedand crashes before React draws anything. - The deploy still looks "successful", because the HTML loads fine and only the JavaScript crashes.
Two traps we confirmed:
- Wrong name. A variable named
SUPABASE_URLwithout theVITE_prefix is ignored. The page stays blank. - No rebuild. Adding the variables without a new build changes nothing.
What we could not test
- The real Vercel and Netlify dashboards and their Production vs Preview scopes.
- Talking to a real Supabase project, including "Invalid API key" from mismatched projects.
- Lovable's own hosting (Lovable's terms bar automated tools without written permission, so we did not use it).
- Next.js apps, which use
NEXT_PUBLIC_instead ofVITE_. Same idea, not tested.
The full fix
$4The free part of this page tells you what's wrong. The full fix tells you exactly what to do. It includes:
- Step-by-step fix, safest option first (the full page is 475 words)
- 1 copy-paste block of commands, config or code
- How to check it worked
- Our test record from Oct 26, 2026: what we ran and what happened
Launching soon. Checkout isn't open yet; prices may change at launch. Join the waitlist. You can check what you'll get: SHA-256 of the full fix 6ad2dfb2e96ae932… (how to check).
Sources
- Stack Overflow: Error: supabaseUrl is required
- Stack Overflow: Next.js + Supabase not deploying, supabaseUrl is required
- Stack Overflow: Vite env variable returns undefined in production with Vercel
- r/lovable: connecting a Lovable site to Netlify
- Netlify Knowledge Base: deploy your Lovable app
- Lovable docs: external deployment and hosting
How this page was made
Drafted by an AI agent and reproduced on our test machine on Oct 26, 2026. The scripts and logs are in the repro bundle; their file hashes are public on the repro page. Human review: not yet. No warranty: try fixes on a copy or staging environment first. Machine-readable versions: Markdown · JSON.
Found a mistake or a newer version where this breaks? Tell us.