{"record":{"id":"07fa3b0ca530851b","repo":"remotion-dev/remotion","slug":"name-must-be-greater-than-0-but-got-json-s-07fa3b","errorCode":null,"errorMessage":"\"${name}\" must be greater than 0, but got ${JSON.stringify(value)}","messagePattern":"\"(.+?)\" must be greater than 0, but got (.+?)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/effects/src/checkerboard.ts","lineNumber":148,"sourceCode":"\nconst resolve = (p: CheckerboardParams): CheckerboardResolved => {\n\tconst cellSize = p.cellSize ?? DEFAULT_CELL_SIZE;\n\tconst gap = p.gap ?? DEFAULT_GAP;\n\n\treturn {\n\t\tcolors: p.colors ?? DEFAULT_COLORS,\n\t\tcellSize,\n\t\tspacing: cellSize + gap,\n\t\tangle: p.angle ?? DEFAULT_ANGLE,\n\t\toffsetX: p.offsetX ?? DEFAULT_OFFSET_X,\n\t\toffsetY: p.offsetY ?? DEFAULT_OFFSET_Y,\n\t\tmaskToSourceAlpha: p.maskToSourceAlpha ?? DEFAULT_MASK_TO_SOURCE_ALPHA,\n\t};\n};\n\nconst validatePositive = (value: number, name: string): void => {\n\tif (value <= 0) {\n\t\tthrow new TypeError(\n\t\t\t`\"${name}\" must be greater than 0, but got ${JSON.stringify(value)}`,\n\t\t);\n\t}\n};\n\nconst validateNonNegative = (value: number, name: string): void => {\n\tif (value < 0) {\n\t\tthrow new TypeError(\n\t\t\t`\"${name}\" must be greater than or equal to 0, but got ${JSON.stringify(value)}`,\n\t\t);\n\t}\n};\n\nconst validateColors = (colors: unknown): void => {\n\tif (colors === undefined) {\n\t\treturn;\n\t}\n","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/checkerboard.ts#L130-L166","documentation":"Thrown by validatePositive() during checkerboard parameter validation when a numeric prop that must be strictly positive is <= 0. In the shipped validator this is applied to cellSize (the square size in pixels). It is a TypeError raised before any GL work, so it indicates bad input from the composition author, not a GPU problem.","triggerScenarios":"Passing <Checkerboard cellSize={0} />, cellSize={-5}, or a keyframed cellSize that crosses zero; validateCheckerboardParams() resolves cellSize and calls validatePositive(cellSize,'cellSize') which throws at checkerboard.ts:148 because value <= 0.","commonSituations":"Typo in a keyframe value, animating cellSize down to 0, passing a 0 from a dynamic data source, or confusing cellSize (must be > 0) with gap (allowed 0).","solutions":["Set cellSize to a positive number (schema min is 0.1, e.g. 80).","Clamp any animated cellSize with Math.max(0.1, value) before passing it.","If you intended no checker cells, remove the effect instead of zeroing cellSize.","Re-check keyframes that interpolate toward 0."],"exampleFix":"// before\n<Checkerboard cellSize={0} />\n\n// after\n<Checkerboard cellSize={80} />\n\n// animated, clamped\n<Checkerboard cellSize={Math.max(10, interpolate(frame, [0, 30], [80, 0]))} />","handlingStrategy":"validation","validationCode":"// Validate cellSize BEFORE passing it to <Checkerboard />.\nconst cellSize = Number(rawCellSize);\nif (!(Number.isFinite(cellSize) && cellSize > 0)) {\n  throw new Error(`cellSize must be > 0, got ${rawCellSize}`);\n}\n// then: <Checkerboard cellSize={cellSize} />","typeGuard":"const isPositiveNumber = (v: unknown): v is number =>\n  typeof v === 'number' && Number.isFinite(v) && v > 0;","tryCatchPattern":null,"preventionTips":["Clamp animated cellSize with Math.max(0.1, value) so keyframes can never reach 0.","Treat cellSize schema min (0.1) as the floor in any dynamic data.","Use the isPositiveNumber guard on values coming from external data before rendering."],"tags":["validation","checkerboard","effects","typescript","params"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}