No Output Directory named "dist" found
Last verified:
The fix
No Output Directory named "dist" found after the Build completed. Vercel looked for a folder the build did not write. Set the framework preset to the app you actually build, or point Output Directory at the folder that exists.
- 1
Read the folder name in the error, then see what the build wrote
Run the same build command locally. Vite leaves
dist/index.html. Next.js leaves.nextand is deployed as a Next.js app, not asdist. If the local build writes nothing, the script is not building the site. Change the script before changing Vercel. - 2
Match the framework preset to the app
Vite, including a Lovable or Bolt export, uses the Vite preset, build command
npm run buildorvite build, and outputdist. Next.js uses the Next.js preset and no static Output Directory. Do not set a Next.js project's output todistorpublic. In a monorepo, set Root Directory to the folder that contains the app'spackage.json. - 3
Remove a stale override
Delete
outputDirectoryfromvercel.jsonunless it is the folder you just watched the build create. Remove a legacybuildslist that points atpublicorbuildfor a Vite app. The framework preset lives in the project settings. Set that to Vite or Next.js. Aframeworkvalue invercel.jsonis the same switch. Settings in the dashboard override the repo until you clear them. Redeploy after the change. Do not commitdist. - 4
After the folder is found, fix refresh separately
A Vite app on Vercel still needs a rewrite to
index.htmlfor client routes, or a reload of/dashboardis a 404. That is the next page. Do not add that rewrite to make this missing-folder error go away. There is noindex.htmluntil the output directory exists.
Why it happens
Vercel runs the build, then publishes one folder. The log says Error: No Output Directory named "dist" found after the Build completed. You can configure the Output Directory in your Project Settings. The quoted name is whatever the project settings or vercel.json asked for. Vite writes dist. Create React App writes build. A preset of Other often looks for public. Next.js on Vercel does not use that static folder. The Next builder publishes its own output.
The build can succeed and this line still fails. npm run build ran tsc and never vite build, or it wrote dist in a subfolder while Vercel looked at the repository root. A Lovable or Bolt export is a Vite app. Importing it as Next.js, or as Other with Output Directory public, looks for a folder the Vite build did not create. A vercel.json outputDirectory overrides the preset. An old builds entry with distDir does too.
A site that deploys and then 404s on refresh of /dashboard got past this error. That is the client-route fallback. A white screen after a successful publish is the blank-page error, not a missing folder.
The next error you'll probably hit
Once this is fixed, the usual follow-up is 404 on refresh of a client route. A 404 on refresh means the Vite app works from /, then a reload of /dashboard misses index.html. Rewrite unknown paths to index.html on the host.
Prompt to paste back into your AI tool
Paste this above the error.
Vercel failed with: No Output Directory named "<dist, public, or build>" found after the Build completed. The framework in package.json is <vite or next>. The build script is <script>. Root directory of the app is <path>. Do not commit the dist folder. Do not set a Next.js app's Output Directory to dist. Do not add a rewrite to index.html until a build actually writes index.html. 1. Say which folder the build command creates locally. If it creates none, fix the script so the real build runs. 2. Set the Vercel framework preset to that tool. For Vite, output is dist. For Next.js, do not set a static output directory. 3. Remove outputDirectory or a legacy builds entry that names a different folder. 4. If this is a monorepo, set Root Directory to the package that contains package.json. Do not edit application components.
Common questions
+The log shows vite build wrote dist/index.html, then says No Output Directory named "dist" found. Why?
Vercel is looking in a different directory than the one Vite wrote. Root Directory is the repository root while the app lives in a subfolder, or an override names another folder. Point Root Directory at the app and keep the output as dist.
+This is a Next.js app and the error names public. What do I change?
The preset is Other, or Output Directory is public. Switch the preset to Next.js and clear the static output directory. Next does not publish a public folder as the site.
Related errors
- 404 on refresh of a client routeA 404 on refresh means the Vite app works from /, then a reload of /dashboard misses index.html. Rewrite unknown paths to index.html on the host.CursorLovableBoltReactViteOct 16, 2026
- Lovable export code won't run: bun installLovable export code won't run until you install with the lockfile in the folder. bun.lock means bun install, then the dev script. Do not add Next.js.LovableCursorViteNodeNov 2, 2026
- Lovable app not deploying: read the bannerLovable app not deploying: the Publish dialog says Build errors need fixing or Publishing failed. Match that sentence, fix that cause, and publish again.LovableCursorViteSupabaseNov 2, 2026
- Image Optimization using the default loader is not compatible with { output: 'export' }Image Optimization using the default loader is not compatible with { output: 'export' }. The default loader needs the server. On a static export, set images.unoptimized. On Vercel, drop output: 'export' if you want the optimizer.Cursorv0BoltNext.jsVercelOct 27, 2026
- Treating warnings as errors because process.env.CI = trueThe Vercel build log says Create React App is failing on warnings because CI is true. A Next.js log that says Failed to compile with a type error is a different check.Cursorv0BoltVercelReactOct 27, 2026