Skip to content
Latchkey

Vercel "Error: No Output Directory named ..." - Fix in CI

The build succeeded, but Vercel looked for the static output in a directory that does not exist. The configured (or preset-inferred) Output Directory does not match where your build actually writes files.

What this error means

The build logs show a successful build, then deploy fails with No Output Directory named "<dir>" found. It is deterministic - the same project setting points at the wrong folder every time.

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

Common causes

Output Directory does not match the build

The project’s Output Directory (e.g. dist) differs from where the framework emits (build, out, .output/public). Vite emits dist, CRA emits build, Next static export emits out.

Wrong framework preset

An incorrect or "Other" framework preset means Vercel infers the wrong default output location, so it cannot find the files.

How to fix it

Set the correct Output Directory

Point Vercel at the directory your build actually produces, in Project Settings or vercel.json.

vercel.json
{
  "outputDirectory": "build"
}

Pick the matching framework preset

  1. Confirm where your build writes (vite builddist, react-scripts buildbuild).
  2. Set the framework preset to your framework so defaults are correct.
  3. If using "Other", set the Output Directory explicitly.

How to prevent it

  • Keep the Output Directory setting aligned with the build tool’s output.
  • Use the correct framework preset rather than "Other".
  • Commit a vercel.json so the output path is versioned, not just a dashboard setting.

Frequently asked questions

What causes ""No Output Directory""?
The project’s Output Directory (e.g. dist) differs from where the framework emits (build, out, .output/public). Vite emits dist, CRA emits build, Next static export emits out.
How do I fix "No Output Directory"?
Point Vercel at the directory your build actually produces, in Project Settings or vercel.json.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card