Most of the "my Lovable app won't deploy" messages I see come down to one of a handful of causes. Some are inside Lovable (the change was never published, the build failed, a security scan or a workspace policy blocked it). The rest happen when you move the app to Vercel, Netlify or Cloudflare and the host is set up for the wrong kind of build.
Here is how I find which one it is, and the fix for each.
The messages you might see
Publishing failedFix security issues to publishPublishing is blocked by workspace policyYou don't have permission to publish this project- Or no message at all: the deploy on Vercel or Netlify fails, or the live site still shows old changes.
Why it happens
- The changes were never published. Lovable does not push edits to the live site by itself, and accepting a draft does not publish it. A small dot on the Publish button means there are unpublished changes.
- The build fails. An error in the code stops the deploy. The Publish button turns into Try to fix, or a Publishing failed banner appears.
- A security scan blocks it. The Publish dialog runs a quick security scan. Its findings don't block publishing by default, but with Block publishing with critical issues turned on, you get Fix security issues to publish until the critical findings are resolved.
- A policy or a missing permission blocks it. By default editors and above can publish. On Enterprise workspaces a policy can require approval (Publish requires approval) or block publishing.
- The outside host is set up for the wrong kind of app. A React and Vite project from Lovable builds static files into
dist. A TanStack Start project needs a host that runs a server, and its build fails ifnitrois missing frompackage.json. - Build-time values are missing.
VITE_SUPABASE_URLandVITE_SUPABASE_PUBLISHABLE_KEYare written into the app when it builds. Set them after the build, or not at all, and the app loads but can't reach its backend.
Find the cause first
- Open the Publish dialog and read what it says. Publishing failed, Try to fix, Fix security issues to publish and a policy message each point to a different cause above.
- Look for the dot on the Publish button. If it's there, the live site is behind the editor.
- Visit the exact published address. Changing the URL subdomain moves the site to a new address, and a new custom domain serves the app only once it shows Live.
- On Vercel, Netlify or Cloudflare, open the failed deploy's build log and read the first error, not only the last line.
- Open
package.jsonin the Code tab.@tanstack/react-startmeans a TanStack Start app that needs a server; otherwise it's a React and Vite app that builds to static files.
Fix 1: Publish from Lovable, then publish every change
- Click Publish (top right, next to Share), check the Website URL and who can see the site, then click Publish. The dialog says Your website is live when the deploy finishes.
- For every later change, open the Publish dialog again and click Publish changes.
- If a Publishing failed banner appears, use what it offers: Try again for a temporary problem, Try to fix for an error in the app or its configuration, and Ask the assistant to help for a database conflict. Internal errors go to Lovable support.
Fix 2: Clear a build error or a blocked publish
- Click Try to fix, or paste the exact error into the chat and ask Lovable to fix only that error.
- If the dialog says Fix security issues to publish, open the scan findings and fix the critical ones rather than turning the block off.
- For Publish requires approval or Publishing is blocked by workspace policy, ask a workspace admin. For You don't have permission to publish this project, ask for editor access.
- If the build keeps failing after each fix, open History, revert to the version marked Published (the last one that went live) and make the change again in smaller steps. Reverting restores code, not database data.
Fix 3: Deploy outside Lovable (Vercel, Netlify, Cloudflare)
- Connect the project to GitHub with Git sync, then import that repository on the host.
- For a React and Vite app, use the build command
npm run build, the output directorydistand Node 22. - If
npm cifails because the repository has onlybun.lock, build with Bun, or generate and commit apackage-lock.json. - Set the
VITE_values from the project's.envfile on the host before the build, and redeploy after any change: they are fixed at build time. - Add the fallback that serves
index.htmlfor app routes (a_redirectsfile on Netlify and Cloudflare,vercel.jsonon Vercel), and add the new domain to your sign-in provider's allowed redirect URLs. - For a TanStack Start app, use a host that runs a server (Vercel, Netlify and Cloudflare Pages detect it automatically) and check that
nitrois inpackage.json.
These are the settings for the common case:
React + Vite app from Lovable, on Vercel, Netlify or Cloudflare Pages Build command npm run build Output directory dist Node version 22 Environment VITE_SUPABASE_URL VITE_SUPABASE_PUBLISHABLE_KEY VITE_SUPABASE_PROJECT_ID (values from the project's .env file, set before the build) Check the fix worked
- The Publish dialog says Your website is live, and the Publish button shows no dot.
- Open the published address in a private window: your latest change is there.
- On an outside host, open a deep link directly and refresh it: the page loads instead of a 404.
- Sign in on the live domain: you come back to the app, not to the preview address or localhost.
Stop it coming back
- Check the live address after you publish, not only the preview.
- Ask a workspace admin or owner to turn on Block publishing with critical issues (Workspace settings > Security), so a change with critical findings can't go live unnoticed.
- Keep the project in GitHub with Git sync, so an outside host builds every push and a failed build shows up at once.
Quick answers
Why does my Lovable app work in the preview but not on the live site? The preview shows the version you're editing; the live site is the snapshot you last published. Click Publish changes to update it, and check you're visiting the exact published address.
Can I deploy a Lovable app to Vercel or Netlify? Yes. Connect it to GitHub with Git sync and import the repository; a React and Vite app builds with npm run build into dist on Node 22. The frontend can move while the app keeps using its Lovable Cloud backend.
Do I need a paid plan to publish? No. Free and Pro projects can publish with public or invite-only access. Connecting a custom domain needs a paid plan.
Sources: Lovable: Publish your Lovable project, Lovable: Deploying and hosting outside Lovable, Lovable: Revert and restore your project with version history.
I keep the full checklist, with related fixes for 404s on refresh and undefined env variables, on our fix page. Once it's live, you can run the free Launch Check on the published address to catch exposed keys and missing security headers.
I wrote this with AI assistance and reviewed it myself.