[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# Build is failing only in Vercel

191 views · 0 likes · 4 posts


Redonkrasniqi (@redonkrasniqi) · 2024-08-24


i am having trouble with the build of my new pull request, I added a vercel.json i fixed the settings in vercel, i have everything set up correctly and the build is running perfectly locally but it just doesnt work on vercel and it always outputs this error:

Error: No Output Directory named "build" found after the Build completed. You can configure the Output Directory in your Project Settings.

what can I do here because I cant figure it out


Pauline P. Narvas (@pawlean) · 2024-08-25

Hi, and welcome @redonkrasniqi!

Could you share your `vercel.json` with us? It sounds like you've set up the Output Directory to `build` but Vercel can't find it.

Sharing some relevant documentation below.

> After building a project, most frameworks output the resulting build in a directory. Only the contents of this Output Directory will be served statically by Vercel. If Vercel detects a framework, the output directory will automatically be configured.

https://vercel.com/docs/deployments/configure-a-build#output-directory 

Hopefully that helps!


Redonkrasniqi (@redonkrasniqi) · 2024-08-25

{
    "builds": [
      {
        "src": "client/package.json",
        "use": "@vercel/static-build",
        "config": {
          "distDir": "client/build"
        }
      }
    ],
    "routes": [
      {
        "src": "/(.*)",
        "dest": "client/build/$1"
      }
    ]
  }
  

this is my vercel.json file, how can i fix this


Pauline P. Narvas (@pawlean) · 2024-08-27

One thing that I recommend to folks is this as starting point.

https://community.vercel.com/t/vite-react-white-screen-issue-after-deployment/694/2