anomalyco/sst · error · VisibleError
No build output found at "${path.resolve(outputPath)}".
Error message
No build output found at "${path.resolve(outputPath)}". What it means
In a static site's buildApp, after the build completes SST verifies the build output directory exists at path.join(sitePath, build.output). This error is thrown when the build reported success (or skipped) but the expected output folder is missing on disk.
Source
Thrown at platform/src/components/base/base-static-site.ts:307
create: output(build).command,
update: output(build).command,
dir: output(sitePath).apply((sitePath) =>
path.join($cli.paths.root, sitePath),
),
environment,
triggers: [Date.now().toString()],
},
{
parent,
ignoreChanges: process.env.SKIP ? ["*"] : undefined,
},
);
// Validate build output
return all([sitePath, build, result.id]).apply(([sitePath, build, _]) => {
const outputPath = path.join(sitePath, build.output);
if (!fs.existsSync(outputPath)) {
throw new VisibleError(
`No build output found at "${path.resolve(outputPath)}".`,
);
}
return outputPath;
});
}
View on GitHub (pinned to a0bd20f762)
Solutions
- Set `build.output` to the directory your build tool actually emits (check locally).
- Fix the build command so it actually produces output (run it manually to verify).
- Confirm the sitePath is correct so output/site paths align.
Example fix
// before
new sst.aws.StaticSite("Site", { path: "src/web", build: { command: "npm run build", output: "build" } });
// after (vite outputs to dist)
new sst.aws.StaticSite("Site", { path: "src/web", build: { command: "npm run build", output: "dist" } }); Defensive patterns
Strategy: validation
Validate before calling
import fs from "node:fs";
import path from "node:path";
const outputPath = path.join(sitePath, buildOutput);
if (!fs.existsSync(outputPath))
throw new Error(`Build output missing: ${path.resolve(outputPath)} — check build.output or run the build locally.`); Prevention
- Run the build command locally once and confirm the output directory name
- Update build.output when switching build tools (webpack vs vite vs next export)
- Don't set a build.output that assumes a tool's default without checking it
When it happens
Trigger: Misconfigured `build.output` (e.g. "dist" vs "build" vs ".output/public"); the build command wrote output elsewhere; or the build silently produced nothing.
Common situations: Switching build tools (webpack dist → vite dist) without updating build.output; a build script that fails silently or is skipped; wrong sitePath so output lands in a different tree.
Related errors
- No site found at "${path.resolve(sitePath)}".
- Missing "name" for domain.
- Need to provide a validated certificate via "cert" when DNS
- Invalid resolver ${operation}
- Cannot configure "pauseAfter" when the minimum ACU is not 0
AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30).
Data as JSON: /api/errors/a6eb2d96bd14ca12.
Report an issue: GitHub.