{"record":{"id":"a6eb2d96bd14ca12","repo":"anomalyco/sst","slug":"no-build-output-found-at-path-resolve-outputpat","errorCode":null,"errorMessage":"No build output found at \"${path.resolve(outputPath)}\".","messagePattern":"No build output found at \"(.+?)\"\\.","errorType":"validation","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/base/base-static-site.ts","lineNumber":307,"sourceCode":"      create: output(build).command,\n      update: output(build).command,\n      dir: output(sitePath).apply((sitePath) =>\n        path.join($cli.paths.root, sitePath),\n      ),\n      environment,\n      triggers: [Date.now().toString()],\n    },\n    {\n      parent,\n      ignoreChanges: process.env.SKIP ? [\"*\"] : undefined,\n    },\n  );\n\n  // Validate build output\n  return all([sitePath, build, result.id]).apply(([sitePath, build, _]) => {\n    const outputPath = path.join(sitePath, build.output);\n    if (!fs.existsSync(outputPath)) {\n      throw new VisibleError(\n        `No build output found at \"${path.resolve(outputPath)}\".`,\n      );\n    }\n\n    return outputPath;\n  });\n}\n","sourceCodeStart":289,"sourceCodeEnd":315,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/base/base-static-site.ts#L289-L315","documentation":"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.","triggerScenarios":"Misconfigured `build.output` (e.g. \"dist\" vs \"build\" vs \".output/public\"); the build command wrote output elsewhere; or the build silently produced nothing.","commonSituations":"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.","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."],"exampleFix":"// before\nnew sst.aws.StaticSite(\"Site\", { path: \"src/web\", build: { command: \"npm run build\", output: \"build\" } });\n// after (vite outputs to dist)\nnew sst.aws.StaticSite(\"Site\", { path: \"src/web\", build: { command: \"npm run build\", output: \"dist\" } });","handlingStrategy":"validation","validationCode":"import fs from \"node:fs\";\nimport path from \"node:path\";\nconst outputPath = path.join(sitePath, buildOutput);\nif (!fs.existsSync(outputPath))\n  throw new Error(`Build output missing: ${path.resolve(outputPath)} — check build.output or run the build locally.`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["static-site","build-output","path-validation","config-validation"],"backgroundTag":"build-output-directory-missing","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}