{"record":{"id":"8176e1f15a1541a2","repo":"anomalyco/sst","slug":"no-site-found-at-path-resolve-sitepath","errorCode":null,"errorMessage":"No site found at \"${path.resolve(sitePath)}\".","messagePattern":"No site found at \"(.+?)\"\\.","errorType":"validation","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/base/base-static-site.ts","lineNumber":219,"sourceCode":"\nexport function prepare(args: BaseStaticSiteArgs) {\n  const sitePath = normalizeSitePath();\n  const environment = normalizeEnvironment();\n  const indexPage = normalizeIndexPage();\n  generateViteTypes();\n\n  return {\n    sitePath,\n    environment,\n    indexPage,\n  };\n\n  function normalizeSitePath() {\n    return output(args.path).apply((sitePath) => {\n      if (!sitePath) return \".\";\n\n      if (!fs.existsSync(sitePath)) {\n        throw new VisibleError(`No site found at \"${path.resolve(sitePath)}\".`);\n      }\n      return sitePath;\n    });\n  }\n\n  function normalizeEnvironment() {\n    return output(args.environment).apply((environment) => environment ?? {});\n  }\n\n  function normalizeIndexPage() {\n    return output(args.indexPage).apply(\n      (indexPage) => indexPage ?? \"index.html\",\n    );\n  }\n\n  function generateViteTypes() {\n    return all([sitePath, args.vite, environment]).apply(\n      ([sitePath, vite, environment]) => {","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/base/base-static-site.ts#L201-L237","documentation":"normalizeSitePath validates the `path` argument of a static site component: if the configured path does not exist on disk, it throws this error with the resolved absolute path to make the misconfiguration obvious.","triggerScenarios":"`new sst.aws.StaticSite(\"Site\", { path: \"./src/site\" })` where that directory doesn't exist (typo, wrong cwd, directory not checked out).","commonSituations":"Running sst.config.ts from a different working directory than expected; misspelled or case-mismatched folder names; missing git submodule or generated directory; deploying in CI without the site folder.","solutions":["Correct the `path` to the actual directory containing your site (relative to sst.config.ts).","Verify the folder exists locally with the exact name/case (ls).","In CI, ensure the site source is checked out (submodules, monorepo sparse checkout)."],"exampleFix":"// before\nnew sst.aws.StaticSite(\"Site\", { path: \"./fronted\" });\n// after\nnew sst.aws.StaticSite(\"Site\", { path: \"./frontend\" });","handlingStrategy":"validation","validationCode":"import fs from \"node:fs\";\nimport path from \"node:path\";\nconst sitePath = \"./frontend\";\nif (!fs.existsSync(sitePath))\n  throw new Error(`Site path does not exist: ${path.resolve(sitePath)}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify site directories exist with exact spelling/case before deploy","In CI, confirm checkout includes the site folder (submodules, sparse checkout)","Prefer configuring paths relative to sst.config.ts consistently"],"tags":["static-site","path-validation","config-validation"],"backgroundTag":"site-path-not-found","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}