"supabaseUrl is required." and a blank white page after deploying your Lovable or Bolt app

Exact error
Uncaught Error: supabaseUrl is required.
Also appears as (1)
  • Blank white page after deploy (Vite + React + Supabase)
Manually verified CI: pending

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
Repro
14 files, hashes public
Fix ID
APP-01
Environment and versions
osDebian 13 (container)
node20.19.2
vite8.3.5
react19.3.1
@supabase/supabase-js2.109.0
browserHeadless 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.

Get the full fix ↓

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 .env file 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 gets undefined and crashes before React draws anything.
  • The deploy still looks "successful", because the HTML loads fine and only the JavaScript crashes.

Two traps we confirmed:

  1. Wrong name. A variable named SUPABASE_URL without the VITE_ prefix is ignored. The page stays blank.
  2. 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 of VITE_. Same idea, not tested.

The full fix

$4

The 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

  1. Stack Overflow: Error: supabaseUrl is required
  2. Stack Overflow: Next.js + Supabase not deploying, supabaseUrl is required
  3. Stack Overflow: Vite env variable returns undefined in production with Vercel
  4. r/lovable: connecting a Lovable site to Netlify
  5. Netlify Knowledge Base: deploy your Lovable app
  6. 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.