Build is failing only in Vercel

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

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.

Hopefully that helps!

{
“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

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