All posts
    Vibe coding
    ·By Usman Jatoi·July 10, 2026·8 min

    Why your Lovable build times out at 400+ pages (and the 1-line fix)

    A true story: 464 auto-generated pages killed every publish for 25+ attempts. The fix was a single line in package.json — and a much better prompt.

    Vibe coding · 8 min

    Why your Lovable build times out at 400+ pages (and the 1-line fix)

    Vibe coding
    Key takeaway
    TL;DR: If your Lovable / Bolt / Cursor project hits a publish timeout after you cross ~400 auto-generated pages, the culprit is almost always a build step chained to your `vite build` (prerender, sitemap crawl, indexing). Move it into a separate script.

    This is a true story. Ours. We rebuilt the publish pipeline for buildonvibe.site 25+ times over one weekend before we found the actual bug and the whole thing came down to one line in package.json.

    What happened

    We shipped a drip system inside our Command Center that auto-generates SEO pages. The rule was simple: never publish more than the daily cap, so we don't waste crawl budget. That worked. What we didn't notice was that the generator kept writing content to the repo, and our published site now had 464 static pages.

    Then we tried to publish. Every deploy would start, appear to work, and then die with a 'Build incomplete — files missing' page on the custom domain. The Lovable agent kept re-triggering `publish`. The site never actually shipped. We tried again. And again. Twenty-five times.

    Key takeaway
    The vibe-coding lesson: when the same 'fix' fails repeatedly, stop asking for the fix. Ask what's happening.

    The meta-prompt that unlocked it

    We stopped saying 'republish' and instead wrote:

    “I added a drip system at X time. Do you think that's interrupting the publish? Check every file we generated. Check every rule and interpreter we've added. Watch the streaming logs of the publish in real time and tell me what's actually failing.”
    The prompt that fixed 25 broken deploys

    The reply came back: 'You were right — there was a real problem. Your build script was chained with a Puppeteer prerender step that renders 464 pages. It exceeds the publish timeout and gets killed, so nothing ever ships. I moved prerender to `bun run build:full` and made build just `vite build` (fast, ~25s). Publishing is running now — site will be live at buildonvibe.site in about a minute.'

    The one-line fix

    Before:

    “"build": "vite build && node scripts/prerender.mjs && node scripts/submit-indexnow.mjs"”

    After:

    “"build": "vite build", "build:full": "vite build && node scripts/prerender.mjs && node scripts/submit-indexnow.mjs"”

    That's it. The prerender step still runs — but on a schedule, not in the critical publish path. Publish time dropped from 'killed after 300 seconds' to 25 seconds. Site went live.

    The bigger lesson: prompts move the needle, not tools

    We had the same tool the entire time. What changed was the shape of the question. 'Publish again' is a command that expects the AI to already know what's wrong. 'Watch the logs, check every rule we added, tell me what's failing' is a diagnostic prompt. The AI can actually reason about it.

    • Never repeat a failing command more than 3 times. It's not going to work the 4th.
    • Add temporal context: 'I added X at time Y — could X be causing this?'
    • Ask for observation, not action: 'What do the logs say?' beats 'Fix it.'
    • Point at the artifact: files, config, package.json, rules, interpreters.
    • Accept that the agent might be wrong. Force it to check evidence in real time.

    How Build on Vibe helps

    Every prompt pack on Build on Vibe is battle-tested against exactly this kind of stuck-loop. When you're on your 4th failed attempt, one of our diagnostic prompts almost always breaks the cycle in a single shot. That's the difference between burning $40 of tokens and shipping in 25 seconds.

    Key takeaway
    Full transparency: this post is why buildonvibe.site exists. Vibe coding wins when the prompt is good. Everything else is just an editor.
    Summarize this page with AI
    Share & save
    Post Share

    Cite this page

    Referencing this in a piece of writing? Copy a formatted citation attribution helps other builders find the source.

    APA
    Usman Jatoi (2026). Why your Lovable build times out at 400+ pages (and the 1-line fix). Build on Vibe. Retrieved from https://buildonvibe.site/blog/why-your-lovable-build-times-out-at-400-pages
    BibTeX
    @misc{bov-blog-why-your-lovable-build-times-out-at-400-pages,
      title  = {Why your Lovable build times out at 400+ pages (and the 1-line fix)},
      author = {Usman Jatoi},
      year   = {2026},
      url    = {https://buildonvibe.site/blog/why-your-lovable-build-times-out-at-400-pages},
      note   = {Build on Vibe}
    }
    Need a hand?

    Talk to a builder, not a bot.

    Questions about vibe coding, prompts, launching, pricing, or a partnership? We reply within one business day usually a few hours.