Home / Fix guides

Fix guides

Each guide starts from the exact error, explains why it happens, and gives a fix you can check. Every guide cites the official docs it relies on.

BoltLovableViteReact Router

404 on page refresh after deploying a Bolt or Lovable app to Vercel or Netlify

The home page loads but refreshing /dashboard, or opening a shared link, returns 404 NOT_FOUND. Single-page apps need one rewrite rule. Here it is for Vercel and Netlify.

Cursorv0BoltLovableViteNext.js

Environment variables are undefined in production (Vite and Next.js apps from Cursor, v0 and Bolt)

supabaseUrl is required, API key undefined, fetch to "undefined/api"… Why browser-side env vars must use the VITE_ or NEXT_PUBLIC_ prefix, why you must rebuild after changing them, and what never to put in them.

LovableBoltSupabase

Fix "new row violates row-level security policy" in Lovable and Supabase apps

Why inserts fail with Postgres error 42501 after you enable RLS on Supabase, and the exact policies and grants that fix it without opening your table to everyone.

Replit

Replit app works in Preview but publishing fails or the live URL is broken

The most common reasons a Replit app passes in Preview but fails to publish: the server listens on localhost instead of 0.0.0.0, Secrets were not added to the deployment, or the homepage is too slow for the health check.

LovableBoltv0CursorSupabase

Supabase confirmation and magic-link emails redirect to localhost after deploy

Your app is live but sign-up confirmation, password reset or OAuth sends users to http://localhost:3000. Here is the Supabase URL setting that causes it and how to set it for production and preview URLs.