remotion-dev/remotion · error · TypeError

${region} is not a valid GCP region. Must be one of: ${GCP_R

Error message

${region} is not a valid GCP region. Must be one of: ${GCP_REGIONS.join(', ')}

What it means

Thrown by validateGcpRegion() (an asserts-narrowing function) when the supplied region is not in the GCP_REGIONS list. Used to ensure region values passed to deploy/render APIs are valid Google Cloud regions Remotion supports. The message enumerates the full set of valid regions.

Source

Thrown at packages/cloudrun/src/shared/validate-gcp-region.ts:8

import type {GcpRegion} from '../pricing/gcp-regions';
import {GCP_REGIONS} from '../pricing/gcp-regions';

export function validateGcpRegion(
	region: unknown,
): asserts region is GcpRegion {
	if (!GCP_REGIONS.includes(region as GcpRegion)) {
		throw new TypeError(
			`${region} is not a valid GCP region. Must be one of: ${GCP_REGIONS.join(
				', ',
			)}`,
		);
	}
}

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Use a region from the printed list, e.g. 'us-east1', 'europe-west1', 'asia-east1'.
  2. Upgrade @remotion/cloudrun if your GCP region was added after your installed version.
  3. Copy the exact region string from the GCP console.

Example fix

// before
await deployService({ region: 'us-east-1', ... }); // AWS name
// after
await deployService({ region: 'us-east1', ... }); // GCP name
Defensive patterns

Strategy: validation

Validate before calling

import { GCP_REGIONS } from '@remotion/cloudrun/pricing/gcp-regions';
if (!GCP_REGIONS.includes(region as never)) {
  throw new Error(`Invalid GCP region. Valid: ${GCP_REGIONS.join(', ')}`);
}

Type guard

import { GCP_REGIONS } from '@remotion/cloudrun/pricing/gcp-regions';
function isValidGcpRegion(v: unknown): boolean {
  return typeof v === 'string' && (GCP_REGIONS as readonly string[]).includes(v);
}

Try / catch

// Validate once at config load; do not retry on invalid region.

Prevention

When it happens

Trigger: Passing a region string not in GCP_REGIONS (e.g., 'us-east-1' which is AWS, a typo like 'us-east11', or a region Remotion does not yet list), or a non-string value that happens to slip through to the includes() check.

Common situations: Confusing AWS region names with GCP ones; using a brand-new GCP region not yet in the list; typo in config; copy-pasting from a Lambda example.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/0cd048f2c8ffa610. Report an issue: GitHub.