remotion-dev/remotion · error · TypeError
Invalid LUT content on line
Error message
Invalid LUT content on line ${lineNumber}: DOMAIN_MAX may only be declared once What it means
DOMAIN_MAX sets the upper input bound of the LUT per channel and may be declared only once. parseCubeLut() throws this TypeError when a second DOMAIN_MAX line appears (this check also covers any second occurrence of the final header directive).
Solutions
- Delete the extra DOMAIN_MAX line, keeping only one
- Update the existing DOMAIN_MAX values instead of adding a new line
- Re-export the LUT with a single domain declaration
Example fix
// before DOMAIN_MAX 1 1 1 DOMAIN_MAX 2 2 2 // after DOMAIN_MAX 2 2 2
Defensive patterns
Strategy: validation
Validate before calling
const maxes = content.split(/\r?\n/).filter((l) => l.trim().startsWith('DOMAIN_MAX'));
if (maxes.length > 1) throw new Error('Duplicate DOMAIN_MAX'); Type guard
null
Try / catch
try {
const lut = parseCubeLut(content);
} catch (e) {
if (e instanceof TypeError && e.message.includes('DOMAIN_MAX may only be declared once')) {
// dedupe DOMAIN_MAX lines and retry
} else throw e;
} Prevention
- Keep one DOMAIN_MAX declaration per file
- Edit domain values in place rather than appending new lines
When it happens
Trigger: parseCubeLut() receives content containing two DOMAIN_MAX lines, e.g. 'DOMAIN_MAX 1 1 1' followed by 'DOMAIN_MAX 2 2 2'.
Common situations: Merged LUT files, manual edits that append a corrected domain line rather than replacing the original.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- Invalid LUT content on line
- Invalid LUT content on line
- Invalid LUT content on line
- Combined 1D and 3D LUTs are not supported.
- Conflicting LUT input range headers.
AI-assisted analysis of remotion-dev/remotion@46a3a6bf13 (2026-09-18).
Data as JSON: /api/errors/c8dffbc6823828b6.
Report an issue: GitHub.
Appendix: source
Thrown at packages/effects/src/lut/parse-cube-lut.ts:144
if (keyword === 'DOMAIN_MIN') {
if (hasDomainMin) {
throw new TypeError(
`Invalid LUT content on line ${lineNumber}: DOMAIN_MIN may only be declared once`,
);
}
domainMin = parseTriplet({
values,
lineNumber,
label: 'DOMAIN_MIN',
});
hasDomainMin = true;
continue;
}
if (hasDomainMax) {
throw new TypeError(
`Invalid LUT content on line ${lineNumber}: DOMAIN_MAX may only be declared once`,
);
}
domainMax = parseTriplet({
values,
lineNumber,
label: 'DOMAIN_MAX',
});
hasDomainMax = true;
continue;
}
if (/^[A-Z_]/i.test(keyword)) {
throw new TypeError(
`Invalid LUT content on line ${lineNumber}: unsupported directive "${keyword}"`,
);
}View on GitHub (pinned to 46a3a6bf13)