{"record":{"id":"4ab71495b5627d3d","repo":"remotion-dev/remotion","slug":"outputrange-must-contain-only-numbers-or-supporte","errorCode":null,"errorMessage":"outputRange must contain only numbers, or supported scale, translate, and rotate strings","messagePattern":"outputRange must contain only numbers, or supported scale, translate, and rotate strings","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/core/src/interpolate.ts","lineNumber":1357,"sourceCode":"\t\t});\n\t}\n\n\tconst hasStringOutput = outputRange.some(\n\t\t(output) => typeof output === 'string',\n\t);\n\tif (outputType !== undefined && outputType !== 'scale' && !hasStringOutput) {\n\t\tthrow new TypeError(\n\t\t\t`${outputType} outputRange must contain strings with the appropriate CSS units`,\n\t\t);\n\t}\n\n\tif (hasStringOutput) {\n\t\tif (\n\t\t\t!outputRange.every(\n\t\t\t\t(output) => typeof output === 'string' || typeof output === 'number',\n\t\t\t)\n\t\t) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'outputRange must contain only numbers, or supported scale, translate, and rotate strings',\n\t\t\t);\n\t\t}\n\n\t\ttry {\n\t\t\treturn interpolateString({\n\t\t\t\tinput,\n\t\t\t\tinputRange,\n\t\t\t\toutputRange,\n\t\t\t\toptions,\n\t\t\t\toutputType,\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (!outputRange.every((output) => typeof output === 'string')) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\tconst hasNonNumericString = outputRange.some((output) => {","sourceCodeStart":1339,"sourceCodeEnd":1375,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/core/src/interpolate.ts#L1339-L1375","documentation":"Thrown by interpolate() in the mixed string-output branch. When at least one output is a string (hasStringOutput), every output must be either a string or a number — the string-interpolation path supports scale/translate/rotate CSS strings mixed with numbers. If any output is neither (a tuple, boolean, object, null), this TypeError fires before interpolateString is attempted.","triggerScenarios":"interpolate(0,[0,1],['100px', true]); interpolate(0,[0,1],['100px', [1,2]]); mixing a CSS string output with a tuple or boolean in the same outputRange.","commonSituations":"Combining transform-string outputs ('rotate(0deg)') with 2D tuple outputs in one array; a stray boolean from a conditional expression slipping into the array.","solutions":["Keep string outputs together only with numbers (no tuples/booleans/objects).","Move tuple-based outputs into a separate interpolate() call.","Audit the array for any element that is not a string or number."],"exampleFix":"// before\nconst r = interpolate(t, [0, 1], ['rotate(0deg)', [0, 1]]);\n// after\nconst rot = interpolate(t, [0, 1], ['rotate(0deg)', 'rotate(90deg)']);","handlingStrategy":"validation","validationCode":"const ok = outputRange.every(\n  (o) => typeof o === 'string' || typeof o === 'number',\n);\nif (outputRange.some((o) => typeof o === 'string') && !ok) {\n  throw new Error('string outputs may mix only with numbers');\n}\nconst r = interpolate(input, inputRange, outputRange);","typeGuard":"const isStringOrNumberArray = (\n  x: unknown[],\n): x is (string | number)[] =>\n  x.every((v) => typeof v === 'string' || typeof v === 'number');","tryCatchPattern":null,"preventionTips":["Keep CSS-string outputs in their own interpolate() call.","Never mix tuples or booleans into a string-output range.","Type string-output ranges as (string | number)[]."],"tags":["interpolation","validation","output-range","css-transform"],"backgroundTag":null,"analyzedSha":"46a3a6bf13ca367376ff18bbb06dae2e87e0d068","analyzedAt":"2026-08-12T17:18:50.444Z","contentChangedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}