remotion-dev/remotion · error · TypeError

You passed to the "from" props of your <Sequence> an argumen

Error message

You passed to the "from" props of your <Sequence> an argument of type ${typeof from}, but it must be a number.

What it means

Thrown by <Sequence> when `from` is present but not of type 'number'. `from` is the sequence's start frame offset; non-numeric values would corrupt every relative-frame calculation downstream. The check reports the actual type to help locate the bad value.

Source

Thrown at packages/core/src/Sequence.tsx:219

				// @ts-expect-error
				JSON.stringify(other.style),
		);
	}

	if (typeof durationInFrames !== 'number') {
		throw new TypeError(
			`You passed to durationInFrames an argument of type ${typeof durationInFrames}, but it must be a number.`,
		);
	}

	if (durationInFrames <= 0) {
		throw new TypeError(
			`durationInFrames must be positive, but got ${durationInFrames}`,
		);
	}

	if (typeof from !== 'number') {
		throw new TypeError(
			`You passed to the "from" props of your <Sequence> an argument of type ${typeof from}, but it must be a number.`,
		);
	}

	if (!Number.isFinite(from)) {
		throw new TypeError(
			`The "from" prop of a sequence must be finite, but got ${from}.`,
		);
	}

	if (typeof trimBefore !== 'number') {
		throw new TypeError(
			`You passed to the "trimBefore" prop of your <Sequence> an argument of type ${typeof trimBefore}, but it must be a number.`,
		);
	}

	if (trimBefore < 0) {
		throw new TypeError(

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Pass a numeric literal: `from={30}`.
  2. Coerce string inputs: `from={Number(value)}`.
  3. Type the prop as `number` in your wrapper to get compile-time protection.
  4. Omit `from` if you want the default (0) rather than passing undefined explicitly.

Example fix

// before
<Sequence from={config.startFrame /* string from URL param */} durationInFrames={30} />
// after
<Sequence from={Number(config.startFrame)} durationInFrames={30} />
Defensive patterns

Strategy: type-guard

Validate before calling

if (typeof from !== 'number') {
  throw new TypeError(`from must be a number; got ${typeof from}`);
}

Type guard

const isNumber = (v: unknown): v is number => typeof v === 'number';

Prevention

When it happens

Trigger: Passing `from="10"` (string), `from={null}`, or `from={undefined}` to <Sequence>; reading `from` from a config that returns a string.

Common situations: Loading sequence timing from JSON or URL params without coercion; copy-pasting from a config that uses strings; defaulting from to undefined before a calculation.

Related errors


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