Saltar al contenido
Blog

Lovable preview not updating, published site old version

Lovable preview not updating, or the published site shows an old version while GitHub has your changes? Check each layer and try the fixes people report.

The Liite team7 min de lectura

Short answer

Work out which layer is stale: your browser, the GitHub repo, Lovable's preview, or the published site. If GitHub has your changes but the preview and live site don't, people report fixing it by cloning the repo, deleting node_modules and dist, adding both to .gitignore, and pushing. Re-syncing the GitHub connection and publishing again also helped. Lovable hasn't documented a cause, as far as we found.

Your latest changes are in GitHub, but the Lovable preview and your domain still show a version from a week or two ago. You searched for lovable preview not updating or lovable published site shows old version, and nothing you do in the editor seems to move it.

Why it happens

No single cause is confirmed. A March 2026 thread on Lovable's community forum describes changes from one to two weeks earlier missing from both the preview and the live domain, even though GitHub had them. The fixes people reported there were a local clean-up of the repo and a GitHub re-sync. We found no statement from Lovable explaining it, so treat the causes below as likely, not proven.

Four things can look the same from the outside:

  1. Browser or network cache. The most common one, and the cheapest to rule out. Other site builders' help pages describe the same pattern: an old copy stays cached in the browser, and a private window shows the real state.
  2. Published is a separate step from editing. In many builders, edits show in the preview at once but reach the live site only after you publish or update again. Lovable's publish flow is likely similar, but check the labels in your own editor.
  3. A broken or one-sided GitHub sync. If the connection between the project and the repo drifts, the repo can hold newer code than the project Lovable previews and publishes.
  4. Build output or dependencies committed to the repo. Folders like node_modules and dist in a repo can confuse a sync or build. This is our reading of why the clean-up worked for people, not a documented cause.
Layer that is staleSymptomMost likely fix
BrowserNew version appears in a private window or on another deviceHard refresh, clear cache
Published sitePreview is current, live domain is notPublish again, check for errors
PreviewGitHub file is right, preview is wrongRe-sync GitHub, then clean the repo
RepoGitHub file is also wrongYour changes never reached it; push or re-sync

Step-by-step fixes

Start with the cheapest check and work down.

1. Rule out caching

  1. Open the live domain in a private window, or on your phone using mobile data.
  2. If the new version shows there, it was cache. Hard-refresh your normal browser or clear its cache for that site.

2. Check where the change actually is

  1. Open the repository on GitHub and view the file you changed.
  2. Look at the commit history for the commit you expect.
  3. If the content is right on GitHub but wrong in the preview, the problem is on the sync or build side. Go to fix 3 or 4.
  4. If GitHub is also wrong, the change never reached the repo. Fix 3 is where to start.

Compare branches

Check that you are looking at the same branch Lovable syncs with. A commit on another branch will not show up in the preview, and it looks exactly like a broken sync.

3. Re-sync the GitHub connection and publish again

  1. In Lovable, open the project's GitHub settings. The exact menu names change, so use the ones you see in your own editor.
  2. Reconnect or re-sync the repository.
  3. Make a small visible edit, such as changing a heading, and wait for the preview to refresh.
  4. Publish again and read the publish status for any error.
  5. Check the live domain in a private window.

One person in the community thread said a re-sync helped. It is cheap, so try it before the clean-up.

4. Clean the repo from a local clone

This is the fix the original poster reported working.

  1. Clone the repository to your computer.
  2. Delete the node_modules and dist folders from the project.
  3. Add both to .gitignore:
node_modules
dist
  1. Commit and push. If node_modules or dist were already tracked by git, also run git rm -r --cached node_modules dist first so git stops tracking them.
  2. Wait for the preview to refresh, publish again, and check the live domain in a private window.

Back up first

Pushing from a local clone changes the repo that Lovable syncs from. Copy your project folder or make a branch before you delete or remove anything, so you can recover if something goes wrong.

5. Confirm the domain points at the right project

If the preview is current and the publish succeeded but the custom domain shows something old, the domain may still be attached to a different project or an earlier deployment. Open the domain settings in Lovable and check which project it is connected to. Also check the default Lovable address for the published site. If that address is current and your domain is not, the cause is in the domain setup or DNS caching, not in the build.

Checklist before you try again

  • The live site looks stale in a private window, not just in your usual browser.
  • The file you changed is correct on the GitHub branch Lovable syncs with.
  • You published again after the last change and saw no error.
  • node_modules and dist are not tracked in the repo.
  • The custom domain is connected to this project.

What won't help

  • Editing the same file again. If the sync is broken, new edits just join the ones that aren't showing.
  • Repeated hard refreshes once a private window has confirmed the live site is really stale.
  • Rewriting your code. In the reported case the repo already had the changes.

If nothing works

Contact Lovable support through their help center, and check their status page first in case it is a platform problem. Say which layer is stale (preview, published site, or both) and when the last change appeared. Include the project link, the repo name and branch, the commit that is missing, and what you already tried.

Subject: Preview and published site show an old version, GitHub is up to date

Hi, my project [project name/URL] shows a version from about [date] in both the
preview and the published site [domain]. My GitHub repo [owner/repo], branch
[branch], contains the newer commit [hash or message] from [date].

What I tried: hard refresh and private window (still old), re-synced the GitHub
connection, published again [with/without error: paste exact text], removed
node_modules and dist from the repo and pushed.

Can you check why the project is not picking up the latest commits?

Common questions

Why is the preview different from the published site?

They are separate. The preview follows your editing session, and the published site only changes when you publish. If the preview is current and the live site is not, publish again and check for an error.

Can I deploy the GitHub repo somewhere else?

Yes. Vercel's documentation describes connecting a Lovable project to Vercel through GitHub, so that every change you make in Lovable syncs to GitHub and triggers a new deployment on Vercel. See Vercel's guide to deploying a Lovable app. That only helps if the sync from Lovable to GitHub is working, so the repo still needs to be current.

Will deleting node_modules break my project?

No. It is regenerated when you run the install command locally, and hosting builds install their own copy. The folder normally does not belong in a repo.

Is it a Lovable bug?

We can't say. The reports we found don't include a confirmed cause or a statement from Lovable, which is why the support route above matters if the fixes fail.

If you need the current version online now

If you need the up-to-date version online while the sync is sorted out, build the project locally and upload the output folder as a static site. Liite's uploaded sites accept a .zip or a folder with index.html at the top level and serve it at a <slug>.liite.site address, and uploading again keeps the address. This covers built static files only: Liite doesn't run builds, deploy from GitHub or run server-side code. A Free uploaded site is limited to 3 MB, needs a card on file and goes offline 7 days after the last publish. See uploaded sites or put an HTML file, a zip or a PDF online.