Vercel deploys invalid version of turborepo app

Hey everyone we are running an issue where pushing a change to our repo rebuilds both of our apps (cms and web). The cms app is fine but the web part is no longer accessible throwing this error when visiting the website:

The deployment also cant be found in the deployment logs, pushing a change actually affecting the app fixes this or redeploying a past deployment.

The app not to deploy since it wasn’t affected. And perhaps even a fallback to the previous successful deployment?

  1. Enable automatic deployments for each app
  2. Push a code change affecting neither app (like a readme or github config file)
  3. Wait for Vercel to deploy
  4. Visit the deployed website

We are running a turborepo project split into web (astro ) and cms (nextjs) part. Deployed on Vercel. This is the repo btw GitHub - usemarble/marble: A simple way to publish articles, product updates and changelogs to your site.

It’s great to see you here, @mezotv! Thank you for posting and welcome to the Community :grinning_face_with_smiling_eyes:

Have you had a chance to check out our debugging 404 errors post? It might be helpful while you’re digging into this.

Looking at your issue, it seems like Vercel is rebuilding both apps in your Turborepo even when only non-app files are changed and as a result, the web app ends up deploying in an invalid state.

This usually happens because Vercel’s default behavior is to rebuild all linked projects whenever any file changes, even if those changes don’t affect the apps themselves.

A few things you can try:

First, you can configure an ignored build step in your web app’s vercel.json so that Vercel only rebuilds when certain files change:

{
  "ignoreCommand": "git diff HEAD^ HEAD --quiet ./src ./public ./package.json ./astro.config.mjs"
}

Next, since you’re already using Turborepo, you can take advantage of Turbo’s built-in filtering. In your Vercel project settings, set your build command to:

turbo build --filter=web...

This ensures that only the web app (or its dependencies) gets built when relevant files are updated.

You can also double-check your turbo.json configuration to make sure dependency mappings are set up correctly, so Turbo knows when each app actually needs to rebuild.

Let us know how you get on!

1 Like

Ill give those a try thank you!

Its weird because when I change 1 app the other one doesn’t deploy and it works fine as seen below:

Hey we tried the suggestions and it seems like the issue persists, is there anything else we can try/do?

We are still running into this issue is there any way we can get help its starting to impact our business

Hey again @mezotv,

Thanks so much for sticking with this and for sharing the repo + screenshots and I’m really sorry this is still happening, especially now that it’s impacting your business.

From what you’ve described:

  • marble-app (cms) is fine :white_check_mark:
  • marble-web shows the Vercel error page with 404: NOT_FOUND
  • GitHub says “Vercel – marble-web – Deployment has completed”
  • But that deployment can’t be found in the Vercel logs / dashboard

…this looks less like an Astro/Turborepo issue and more like Vercel not being able to resolve a deployment for the domain, which is what triggers that NOT_FOUND page.

I had a quick look at your repo and setup:

  • apps/web – Astro app (web)
  • apps/cms – Next.js app (cms)
  • Turborepo is configured with a shared build task in turbo.json

That setup is totally reasonable for two separate Vercel projects (marble-web and marble-app) using monorepo support.

At this point, because the deployment is “completed” in GitHub but apparently missing when you hit the domain, we’ll need to look at project-level logs internally. To help us dig in, could you share a bit more detail:

  1. Which domain(s) are affected?

    • For example: marblecms.com, www._____, or a different custom domain.
    • Is the 404 happening on the Production domain only, or also on Preview deployments?
  2. Which Vercel project owns the “web” domain?

    • In your Vercel dashboard, under Projects → (marble-web) → Domains, can you confirm which domain(s) are attached there?
    • Also double-check that those same domains are not attached to marble-app at the same time, as that can cause routing issues.
  3. An example commit + request ID

    • A link to a GitHub commit where:

      • marble-web check says “Deployment has completed”
      • …but visiting the web URL shows 404: NOT_FOUND.
    • The Request ID from the Vercel error page (the long fral::... string on the 404 screen) from one of those failing requests.

  4. Current build settings for marble-web

    • In Project Settings → Build & Development, what are you using for:

      • Root Directory (I’m assuming apps/web)
      • Build Command (e.g. pnpm turbo build --filter=web... or similar)

While we dig into the NOT_FOUND behaviour, a few things you can try to reduce how often this bites you:

Ensure only relevant commits trigger web builds
Using Turborepo’s filtering in your Build Command (e.g. pnpm turbo build --filter=web...) helps limit when the web app rebuilds.

Use Ignores for non-app changes
Instead of rebuilding on README / config-only changes, you can use the Ignored Build Step feature in your project settings (or ignoreCommand in vercel.json) so that these commits skip a deployment entirely and keep the last known-good one active.

Let me know the answers to the questions above and I’ll keep this thread updated as we learn more.

Hey this just happened again and is affecting our main domain (marblecms.com) one request id is: cdg1::ggp48-1763226555283–4937a7b0e220. The git commit that triggered this deployment was:feat: move to gpt-5.1 for ai · usemarble/marble@4e96e56 · GitHub

And yes the web project actually owns the domain.

Here is our current build settings:

Did you manage to get this fixed?

I just went on your main domain and it works.

Love the design btw, it’s so sleek!

Haha thank you but unfortunately it still doesn’t work I used an instant rollback to display and older deployment!

I just checked the logs for your most recent production deployments. The one that you rolled back to shows the normal sort of output file tree I would expect, but the one that threw a 404 doesn’t match. So that explains the 404 at least. The deployment succeeds and is found, but there’s no homepage available.

Now we need to figure out why the deployment output doesn’t match. What changes happened between the two deployments? Any configuration changes in the code or Vercel project?

Nothing changed this has been happening for a while not just used the most recent occurring as an example.

Thanks to @anthony-shew we fixes this, our turbo.json file was missing the “.vercel/**” output so cache hits didn’t work properly. Thanks for the patience everyone!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.