remotion-dev/remotion · error · Error

The `siteName` must not be `.` or `..`. You passed: ${siteNa

Error message

The `siteName` must not be `.` or `..`. You passed: ${siteName}.

What it means

Thrown by validateSiteName() in @remotion/lambda when siteName is exactly '.' or '..'. These are reserved filesystem/path segments and would collide with S3 key / bucket-prefix semantics, so they are explicitly rejected after the type check passes.

Source

Thrown at packages/lambda/src/shared/validate-site-name.ts:17

const VALID_SITE_NAME_RE = /^[-0-9a-zA-Z!_.*'()]+$/;

export const validateSiteName = (siteName: unknown) => {
	if (typeof siteName === 'undefined') {
		return;
	}

	if (typeof siteName !== 'string') {
		throw new TypeError(
			`The 'siteName' argument must be a string if provided, but is ${JSON.stringify(
				siteName,
			)}`,
		);
	}

	if (siteName === '.' || siteName === '..') {
		throw new Error(
			'The `siteName` must not be `.` or `..`. You passed: ' + siteName + '.',
		);
	}

	if (!VALID_SITE_NAME_RE.test(siteName)) {
		throw new Error(
			'The `siteName` must match the RegExp `/' +
				VALID_SITE_NAME_RE.source +
				'/`. You passed: ' +
				siteName +
				'. Check for invalid characters.',
		);
	}
};

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Choose a descriptive siteName using safe characters (alphanumerics, '-', '_', '.', '*', "'", '(', ')', '!').
  2. If '.' was meant as 'default', pass undefined instead.
  3. Sanitize path-derived input before reusing it as a siteName.

Example fix

// before
const siteName = pathInput || '.';
await deploySite({ siteName });

// after
const siteName = pathInput && pathInput !== '.' && pathInput !== '..' ? pathInput : undefined;
await deploySite({ siteName });
Defensive patterns

Strategy: validation

Validate before calling

const RESERVED = new Set(['.', '..']);
const siteName = raw && !RESERVED.has(raw) ? raw : undefined;

Type guard

const isSafeSiteName = (v: unknown): v is string =>
  typeof v === 'string' && v !== '.' && v !== '..' && /^[-0-9a-zA-Z!_.*'()]+$/.test(v);

Prevention

When it happens

Trigger: Passing siteName: '.' or siteName: '..' to any @remotion/lambda API that accepts a site name (deploySite, bucket creation, etc.).

Common situations: A default/fallback expression that resolves to '.' (current dir placeholder) when a config field is empty; user input taken from a path component that turns out to be '.' or '..'.

Related errors


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