{"record":{"id":"0a26781e9b6bd805","repo":"remotion-dev/remotion","slug":"name-must-be-1","errorCode":null,"errorMessage":"\"${name}\" must be >= 1","messagePattern":"\"(.+?)\" must be >= 1","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/effects/src/linear-progressive-pixelate/index.ts","lineNumber":110,"sourceCode":"});\n\nconst assertOptionalUvCoordinate = (value: unknown, name: string): void => {\n\tif (value === undefined) {\n\t\treturn;\n\t}\n\n\tif (\n\t\t!Array.isArray(value) ||\n\t\tvalue.length !== 2 ||\n\t\tvalue.some((item) => typeof item !== 'number' || !Number.isFinite(item))\n\t) {\n\t\tthrow new TypeError(`\"${name}\" must be a [number, number] tuple`);\n\t}\n};\n\nconst validateBlockSize = (value: number, name: string): void => {\n\tif (value < 1) {\n\t\tthrow new TypeError(`\"${name}\" must be >= 1`);\n\t}\n};\n\nconst validateParams = (params: LinearProgressivePixelateParams): void => {\n\tassertEffectParamsObject(params, 'Linear progressive pixelate');\n\tassertOptionalUvCoordinate(params.start, 'start');\n\tassertOptionalUvCoordinate(params.end, 'end');\n\tassertOptionalFiniteNumber(params.startBlockSize, 'startBlockSize');\n\tassertOptionalFiniteNumber(params.endBlockSize, 'endBlockSize');\n\tvalidateBlockSize(\n\t\tparams.startBlockSize ?? DEFAULT_START_BLOCK_SIZE,\n\t\t'startBlockSize',\n\t);\n\tvalidateBlockSize(\n\t\tparams.endBlockSize ?? DEFAULT_END_BLOCK_SIZE,\n\t\t'endBlockSize',\n\t);\n};","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/linear-progressive-pixelate/index.ts#L92-L128","documentation":"Thrown by validateBlockSize() in the linear-progressive-pixelate effect when startBlockSize or endBlockSize (after applying the default of 1/40) is less than 1. Block size is the pixelation cell size and must be a positive integer-or-number >= 1, so 0 or negative values are rejected at setup.","triggerScenarios":"Calling linearProgressivePixelate({ startBlockSize: 0 }) or with a negative value, or animating endBlockSize with interpolate and letting it cross below 1. Because the default is substituted before validation, even passing `undefined` is safe — only an explicit <1 number triggers it.","commonSituations":"Animators driving block size to 0 at the start of a transition; passing a fractional value < 1 thinking it means 'sub-pixel'; copy-pasting a value from a different effect whose minimum is 0; off-by-one in interpolate's `extrapolateLeft/Right` clamping.","solutions":["Set startBlockSize/endBlockSize to >= 1 (use 1 for 'no pixelation').","When animating, clamp the value: Math.max(1, interpolate({ input, range, output: [...] })).","Pass `undefined` (or omit) to use the defaults rather than 0.","If you need a smooth 'pixelate in' transition, animate from 1 upward, never from 0."],"exampleFix":"// before\nlinearProgressivePixelate({ endBlockSize: interpolate({ input: frame, range: [0, 30], range: [0, 40] }) });\n\n// after — clamp so the value never drops below 1\nconst size = Math.max(1, interpolate({ input: frame, range: [0, 30], output: [1, 40], extrapolateLeft: 'clamp', extrapolateRight: 'clamp' }));\nlinearProgressivePixelate({ endBlockSize: size });","handlingStrategy":"validation","validationCode":"import {interpolate} from 'remotion';\n\n// Clamp any animated block size so the effect never sees a value < 1.\nconst safeBlockSize = (v: number) => Math.max(1, v);\n\nconst endBlockSize = safeBlockSize(\n  interpolate({input: frame, range: [0, 30], output: [1, 40], extrapolateLeft: 'clamp', extrapolateRight: 'clamp'})\n);\nlinearProgressivePixelate({ endBlockSize });","typeGuard":"const isValidBlockSize = (v: unknown): v is number =>\n  typeof v === 'number' && Number.isFinite(v) && v >= 1;","tryCatchPattern":null,"preventionTips":["Always set startBlockSize/endBlockSize to >= 1; use 1 for 'no pixelation'.","Clamp animated block sizes with Math.max(1, ...) and interpolate's clamp extrapolation.","Omit the field to accept the default rather than passing 0.","Animate pixelate transitions from 1 upward, never from 0."],"tags":["validation","typescript","params","argument","range"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}