remotion-dev/remotion · error · TypeError
outputRange tuples must contain at least 1 number
Error message
outputRange tuples must contain at least 1 number
What it means
Thrown by validateTupleOutputRange when the first tuple in outputRange has length 0. Each tuple must contribute at least one number to interpolate, so an empty tuple ([]) is rejected even though the array itself is non-empty.
Source
Thrown at packages/core/src/interpolate.ts:961
}
}
const range = findRange(resolvedInput, inputRange);
return resolvedInput >= inputRange[range + 1]
? outputRange[range + 1]
: outputRange[range];
};
const validateTupleOutputRange = (
outputRange: readonly (readonly unknown[])[],
): number => {
const dimensions = outputRange[0]?.length;
if (dimensions === undefined) {
throw new Error('outputRange must have at least 1 element');
}
if (dimensions === 0) {
throw new TypeError('outputRange tuples must contain at least 1 number');
}
for (const output of outputRange) {
if (output.length !== dimensions) {
throw new TypeError(
`outputRange tuples must all have the same length, but got ${dimensions} and ${output.length}`,
);
}
for (const value of output) {
if (typeof value !== 'number' || !Number.isFinite(value)) {
throw new TypeError(
`outputRange tuples must contain only finite numbers, but got [${output.join(
',',
)}]`,
);
}
}View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Give every tuple at least one number: [[0], [1]] or [[0,0], [1,1]].
- Filter or assert non-empty tuples before calling interpolate().
Example fix
// before interpolate(t, [0, 1], [[], []]); // after interpolate(t, [0, 1], [[0], [1]]);
Defensive patterns
Strategy: validation
Validate before calling
if (!outputRange.every((t) => Array.isArray(t) && t.length > 0)) {
throw new Error('Every tuple in outputRange must contain at least 1 number');
} Type guard
function isNonEmptyTuples(arr: readonly unknown[]): boolean {
return arr.every((t) => Array.isArray(t) && t.length > 0);
} Prevention
- Ensure each tuple has at least one number.
- When building tuples programmatically, filter out empty sub-arrays before calling interpolate().
When it happens
Trigger: interpolate(t, [0, 1], [[], []]) or any outputRange of empty arrays. Also reachable by spreading an array of arrays that contains an empty sub-array.
Common situations: Building tuple outputRange programmatically and producing an empty tuple for some keyframe; mapping a source array that yields zero-length results.
Related errors
- outputRange tuples must all have the same length, but got ${
- String outputRange values must contain 1 to 3 components, bu
- bezier x values must be in [0, 1] range
- invalid color string ${color} provided
- input can not be undefined
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/ac37df2530e1de7e.
Report an issue: GitHub.