{"record":{"id":"695aa3f06848391f","repo":"remotion-dev/remotion","slug":"outputrange-must-have-at-least-1-element","errorCode":null,"errorMessage":"outputRange must have at least 1 element","messagePattern":"outputRange must have at least 1 element","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/interpolate.ts","lineNumber":800,"sourceCode":"\t\t\t\t\t\tnumber,\n\t\t\t\t\t\tnumber,\n\t\t\t\t\t\tnumber,\n\t\t\t\t\t\tnumber,\n\t\t\t\t\t],\n\t\t\t\t\tunits: [null, null, null, parsed.units[0]] as [\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\tstring | null,\n\t\t\t\t\t],\n\t\t\t\t\tdimensions: 4,\n\t\t\t\t\taxisRotation: true,\n\t\t\t\t};\n\t\t\t})\n\t\t: initiallyParsedOutputRange;\n\tconst kind = parsedOutputRange[0]?.kind;\n\tif (kind === undefined) {\n\t\tthrow new Error('outputRange must have at least 1 element');\n\t}\n\n\tfor (const parsed of parsedOutputRange) {\n\t\tif (parsed.kind !== kind) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`Cannot interpolate ${kind} values with ${parsed.kind} values`,\n\t\t\t);\n\t\t}\n\t}\n\n\tconst dimensions = Math.max(\n\t\t...parsedOutputRange.map((parsed) => parsed.dimensions),\n\t);\n\tconst units: [string | null, string | null, string | null, string | null] = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,","sourceCodeStart":782,"sourceCodeEnd":818,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/interpolate.ts#L782-L818","documentation":"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.","triggerScenarios":"Reachable only if interpolateString is invoked with an empty outputRange bypassing the public guards; not reachable through interpolate() in normal use.","commonSituations":"Effectively unreachable from the public API. If seen, an internal caller passed [] directly to interpolateString.","solutions":["Ensure outputRange has at least one element when calling interpolate().","If using an internal helper, guard the call site against empty arrays."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!Array.isArray(outputRange) || outputRange.length === 0) {\n  throw new Error('outputRange must have at least 1 element');\n}","typeGuard":"function isNonEmpty<T>(arr: readonly T[]): arr is readonly [T, ...T[]] {\n  return arr.length > 0;\n}","tryCatchPattern":null,"preventionTips":["Always supply at least one outputRange element.","This message is defensive; if you hit it from interpolate(), file a bug with the call arguments."],"tags":["interpolate","string-interpolation","empty-array","defensive"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}