Vercel build error: No Output Directory found (missing public directory)
Vercel fails after the build with a missing Output Directory error? The folder it serves is missing, empty, or set wrong. Match it to what your build writes.
Reviewed October 25, 2026
What it means in plain English
Vercel's knowledge base shows this error as No Output Directory named "NAME", where NAME is the directory you configured as the output. Vercel's error list covers it under Missing public directory. Vercel says the build step results in an error if the output directory is missing, empty, or invalid, for example when it is not a directory.
The Output Directory is the folder your build writes the finished site into. Vercel's build docs say only the contents of this folder are served. If Vercel detects your framework, it sets the folder for you. If the setting points at a folder your build never creates, the deploy fails after the build finishes.
Likely causes
- The Output Directory in project settings does not match the folder your build creates.
- The build command did not produce files, so the folder is empty or missing.
- The app lives in a subfolder of the repository and the Root Directory is not set, so Vercel looks in the wrong place.
- The Framework Preset is wrong, so Vercel guesses the wrong output folder.
How to fix it, step by step
- Run the build command locally and look at which folder it creates. Vercel suggests this to make sure the files are generated in the output directory you specified.
- In Vercel, open your project, then Settings, then Build and Deployment. Check that the Output Directory matches the folder from step 1. If you change the Override setting, Vercel applies it on the next deployment.
- If the Output Directory is right, check the Build Command. A command that does not build the site leaves the folder missing or empty.
- If your app is in a subfolder, set the Root Directory on the same settings page to that subfolder.
- In a Turborepo or Nx monorepo, Vercel's knowledge base suggests redeploying without the build cache. If that works, the output folders are not set correctly in
outputsinturbo.jsonor innx.json. - To set the folder in code instead of the dashboard, add
outputDirectorytovercel.json. Vercel documents this for overriding the Output Directory on a deployment:
{
"outputDirectory": "dist"
}
- For a plain static site with no build, Vercel says to choose "Other" as the Framework Preset. That uses
publicif it exists, or the project root otherwise. - Redeploy.
How to check it worked
- The build log ends without the missing Output Directory error and the deployment is Ready.
- The deployment URL shows your site, not a 404.
Sources
Related fixes
More Vercel deploy and runtime fixes
Keep going on your own.
The guides stay free. A deep leak report is $15. Fix packs are $24, or $49 for all three. There is no done-for-you repair.