anomalyco/sst · error · VisibleError
No deployment regions specified. Please specify at least one
Error message
No deployment regions specified. Please specify at least one region in the 'regions' property.
What it means
SSR site components support regional deployment via the `regions` prop (or the fallback of the current stack's region). If the resulting regions list is empty — e.g. `regions: []` — SST refuses to deploy because at least one deployment region is required to create the server functions.
Source
Thrown at platform/src/components/aws/ssr-site.ts:1224
if (!sitePath) return ".";
if (!fs.existsSync(sitePath)) {
throw new VisibleError(
`Site directory not found at "${path.resolve(
sitePath,
)}". Please check the path setting in your configuration.`,
);
}
return sitePath;
});
}
function normalizeRegions() {
return output(
args.regions ?? [getRegionOutput(undefined, { parent: self }).region],
).apply((regions) => {
if (regions.length === 0)
throw new VisibleError(
"No deployment regions specified. Please specify at least one region in the 'regions' property.",
);
return regions.map((region) => {
if (
[
"ap-south-2",
"ap-southeast-4",
"ap-southeast-5",
"ca-west-1",
"eu-south-2",
"eu-central-2",
"il-central-1",
"me-central-1",
].includes(region)
)
throw new VisibleError(
`Region ${region} is not supported by this component. Please select a different AWS region.`,View on GitHub (pinned to a0bd20f762)
Solutions
- Provide at least one region, e.g. `regions: ["us-east-1"]`
- Remove the `regions` prop entirely to default to the stack's own region
- Fix the logic/env var feeding the regions array so it is non-empty
Example fix
// before
new sst.aws.NextjsSite("Web", { path: "src", regions: [] });
// after
new sst.aws.NextjsSite("Web", { path: "src", regions: ["us-east-1"] }); Defensive patterns
Strategy: validation
Validate before calling
const regions = process.env.SITE_REGIONS?.split(",") ?? [];
if (regions.length === 0) {
throw new Error("Provide at least one region via SITE_REGIONS or omit `regions` to use the stack region");
} Type guard
function hasRegions(r: string[] | undefined): r is [string, ...string[]] {
return Array.isArray(r) && r.length > 0;
} Try / catch
try {
new sst.aws.NextjsSite("Web", { path: "src", regions });
} catch (e) {
if (String(e).includes("No deployment regions")) console.error("regions resolved to empty list");
throw e;
} Prevention
- Don't pass `regions: []`; omit the prop to default to the stack's region
- Validate any env-driven regions list before constructing the component
- Type regions as [string, ...string[]] to catch empties at compile time
When it happens
Trigger: Explicitly passing `regions: []` to an SSR site component, or providing a regions array that resolves to an empty list.
Common situations: Dynamically computing regions from env/config that ends up empty; copy-pasting an example with a placeholder list and clearing it; conditional logic that strips all regions in some environments.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- Site directory not found at "${path.resolve(sitePath)}". Ple
- Region ${region} is not supported by this component. Please
- Invalid AWS region: "${region}". Please specify a valid AWS
- You cannot provide both "job" and "function" in the "${name}
- You cannot provide both a function and a task in the "${name
AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30).
Data as JSON: /api/errors/7bc03be0ddc7de02.
Report an issue: GitHub.