{"record":{"id":"5365a018377a9de5","repo":"anomalyco/sst","slug":"site-directory-not-found-at-path-resolve-sitepa-5365a0","errorCode":null,"errorMessage":"Site directory not found at \"${path.resolve(sitePath)}\". Please check the path setting in your configuration.","messagePattern":"Site directory not found at \"(.+?)\"\\. Please check the path setting in your configuration\\.","errorType":"validation","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/cloudflare/ssr-site.ts","lineNumber":225,"sourceCode":"        const linkBindings = links.filter(Link.isLinkable).map((link) =>\n          output({\n            urn: link.urn,\n            link: link.getSSTLink(),\n          }).apply(({ urn, link }) => ({\n            name: urn.split(\"::\").at(-1)!,\n            include: link.include ?? [],\n            properties: link.properties,\n          })),\n        );\n        return linkBindings.length > 0 ? all(linkBindings) : [];\n      });\n    }\n\n    function normalizeSitePath() {\n      const sitePath = args.path ?? \".\";\n\n      if (!fs.existsSync(sitePath)) {\n        throw new VisibleError(\n          `Site directory not found at \"${path.resolve(\n            sitePath,\n          )}\". Please check the path setting in your configuration.`,\n        );\n      }\n\n      return sitePath;\n    }\n\n    function createWorker() {\n      return new Worker(\n        ...transform(\n          args.transform?.server,\n          `${name}Worker`,\n          {\n            environment: args.environment,\n            link: args.link,\n            accountId: args.accountId,","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/cloudflare/ssr-site.ts#L207-L243","documentation":"`sst.cloudflare.SsrSite`-based components resolve the site directory from `args.path` (defaulting to `.`). If that directory doesn't exist on disk at synth time, SST throws this VisibleError so the misconfiguration is caught before any build runs.","triggerScenarios":"Passing a `path` value that doesn't exist relative to the process working directory: typos in app names, referencing a monorepo app from the wrong root, or running the CLI from an unexpected cwd.","commonSituations":"Renaming or moving an app in a monorepo without updating sst.config.ts; CI checkout paths differing from local; absolute vs relative path confusion; deploying before submodules/apps are checked out.","solutions":["Correct the `path` value to an existing directory (relative to where you run the CLI)","Run `sst` from the repository root so relative paths resolve as intended","Verify the app directory exists in CI (full checkout of submodules/workspace apps)"],"exampleFix":"// before\nnew sst.cloudflare.Nextjs('Site', { path: 'apps/webs' }); // typo\n// after\nnew sst.cloudflare.Nextjs('Site', { path: 'apps/web' });","handlingStrategy":"validation","validationCode":"import { existsSync } from 'fs';\nconst sitePath = 'apps/web';\nif (!existsSync(sitePath)) throw new Error(`Site path does not exist: ${sitePath}`);\nnew sst.cloudflare.Nextjs('Site', { path: sitePath });","typeGuard":null,"tryCatchPattern":"try {\n  await deploy();\n} catch (e) {\n  if (/Site directory not found/.test(e.message)) console.error('Check `path` in your component config and your working directory');\n}","preventionTips":["Run sst from the repository root so relative paths resolve consistently","Double-check app directory names after renames in monorepos","Ensure CI checks out all workspace apps","Prefer paths relative to the repo root"],"tags":["path","configuration","directory-not-found","ssr"],"backgroundTag":"path-not-found","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}