earendil-works/pi · error · Error
Invalid theme "${label}":
Error message
Invalid theme "${label}": What it means
Error "Invalid theme "${label}":" thrown in earendil-works/pi.
Source
Thrown at packages/coding-agent/src/modes/interactive/theme/theme.ts:589
const path = error.instancePath || "/";
otherErrors.push(` - ${path}: ${error.message}`);
}
let errorMessage = `Invalid theme "${label}":\n`;
if (missingColors.size > 0) {
errorMessage += "\nMissing required color tokens:\n";
errorMessage += Array.from(missingColors)
.sort()
.map((color) => ` - ${color}`)
.join("\n");
errorMessage += '\n\nPlease add these colors to your theme\'s "colors" object.';
errorMessage += "\nSee the built-in themes (dark.json, light.json) for reference values.";
}
if (otherErrors.length > 0) {
errorMessage += `\n\nOther errors:\n${otherErrors.join("\n")}`;
}
throw new Error(errorMessage);
}
const themeJson = json as ThemeJson;
assertThemeNameIsValid(themeJson.name);
return themeJson;
}
function parseThemeJsonContent(label: string, content: string): ThemeJson {
let json: unknown;
try {
json = JSON.parse(stripBom(content));
} catch (error) {
throw new Error(`Failed to parse theme ${label}: ${error}`);
}
return parseThemeJson(label, json);
}
function loadThemeJson(name: string): ThemeJson {View on GitHub (pinned to 4af9d21d3b)
When it happens
Trigger: Thrown at packages/coding-agent/src/modes/interactive/theme/theme.ts:589 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/3a01908768873e67.
Report an issue: GitHub.