{"record":{"id":"22d49b83343873e1","repo":"remotion-dev/remotion","slug":"name-must-be-1-22d49b","errorCode":null,"errorMessage":"\"${name}\" must be >= 1","messagePattern":"\"(.+?)\" must be >= 1","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/effects/src/radial-progressive-pixelate/index.ts","lineNumber":153,"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: RadialProgressivePixelateParams): void => {\n\tassertEffectParamsObject(params, 'Radial progressive pixelate');\n\tassertOptionalUvCoordinate(params.center, 'center');\n\tassertOptionalFiniteNumber(params.width, 'width');\n\tassertOptionalFiniteNumber(params.height, 'height');\n\tassertOptionalFiniteNumber(params.rotation, 'rotation');\n\tvalidateNonNegative(params.width ?? DEFAULT_WIDTH, 'width');\n\tvalidateNonNegative(params.height ?? DEFAULT_HEIGHT, 'height');\n\tassertOptionalFiniteNumber(params.start, 'start');\n\tvalidateUnitInterval(params.start ?? DEFAULT_START, 'start');\n\tassertOptionalFiniteNumber(params.startBlockSize, 'startBlockSize');\n\tassertOptionalFiniteNumber(params.endBlockSize, 'endBlockSize');\n\tvalidateBlockSize(\n\t\tparams.startBlockSize ?? DEFAULT_START_BLOCK_SIZE,\n\t\t'startBlockSize',","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/radial-progressive-pixelate/index.ts#L135-L171","documentation":"The radialProgressivePixelate effect validates that numeric block-size parameters are at least 1. If a value less than 1 is supplied, the effect throws a TypeError because sub-pixel block sizes are physically meaningless and would produce undefined pixelation behavior.","triggerScenarios":"Passing blockSize: 0, blockSize: 0.5, or blockSize: -4. The check fires after assertOptionalFiniteNumber confirms the value is a valid finite number, so this strictly catches the range violation.","commonSituations":"Accidentally passing 0 as a default/uninitialized value; computing block size from a ratio that rounds down to zero at small resolutions; negative values from a subtractive calculation.","solutions":["Pass a block size of 1 or greater (e.g. 8, 16, 32 for typical pixelation looks)","Clamp computed values: blockSize: Math.max(1, computedBlockSize)","If the parameter is optional, omit it entirely to use the default","Validate with a unit test that your dynamic block-size formula never yields a value below 1"],"exampleFix":"// before\nradialProgressivePixelate({ blockSize: 0 })\n// after\nradialProgressivePixelate({ blockSize: Math.max(1, Math.round(width / 100)) })","handlingStrategy":"validation","validationCode":"const blockSize = Math.max(1, Math.round(width / 100));\nif (blockSize < 1) throw new Error('blockSize must be >= 1');\nradialProgressivePixelate({ blockSize });","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Clamp computed block sizes with Math.max(1, value) before passing","Use integer values; sub-1 values are meaningless for pixelation","Unit-test dynamic block-size formulas across expected resolution ranges"],"tags":["validation","typescript","numeric-bounds","radial-progressive-pixelate"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}