remotion-dev/remotion · error · Error
outputRange must have at least 1 element
Error message
outputRange must have at least 1 element
What it means
Thrown by interpolateString when parsedOutputRange is empty so the first element's kind is undefined. This is a defensive guard: the public interpolate() entry point requires inputRange and outputRange to have equal length and inputRange to contain at least one finite number, so an empty outputRange is normally rejected earlier.
Source
Thrown at packages/core/src/interpolate.ts:800
number,
number,
number,
number,
],
units: [null, null, null, parsed.units[0]] as [
null,
null,
null,
string | null,
],
dimensions: 4,
axisRotation: true,
};
})
: initiallyParsedOutputRange;
const kind = parsedOutputRange[0]?.kind;
if (kind === undefined) {
throw new Error('outputRange must have at least 1 element');
}
for (const parsed of parsedOutputRange) {
if (parsed.kind !== kind) {
throw new TypeError(
`Cannot interpolate ${kind} values with ${parsed.kind} values`,
);
}
}
const dimensions = Math.max(
...parsedOutputRange.map((parsed) => parsed.dimensions),
);
const units: [string | null, string | null, string | null, string | null] = [
null,
null,
null,
null,View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Ensure outputRange has at least one element when calling interpolate().
- If using an internal helper, guard the call site against empty arrays.
Defensive patterns
Strategy: validation
Validate before calling
if (!Array.isArray(outputRange) || outputRange.length === 0) {
throw new Error('outputRange must have at least 1 element');
} Type guard
function isNonEmpty<T>(arr: readonly T[]): arr is readonly [T, ...T[]] {
return arr.length > 0;
} Prevention
- Always supply at least one outputRange element.
- This message is defensive; if you hit it from interpolate(), file a bug with the call arguments.
When it happens
Trigger: Reachable only if interpolateString is invoked with an empty outputRange bypassing the public guards; not reachable through interpolate() in normal use.
Common situations: Effectively unreachable from the public API. If seen, an internal caller passed [] directly to interpolateString.
Related errors
- Cannot interpolate ${kind} values because axis ${axis + 1} h
- Cannot interpolate "${value}" because "${component}" is not
- Expected a keyword and a length-percentage value
- outputRange must contain only finite numbers, but got [${out
- String outputRange values must contain 1 to 3 components, bu
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/695aa3f06848391f.
Report an issue: GitHub.