GoogleChrome/lighthouse · error
Can only load ctc files
Error message
Can only load ctc files
What it means
Error "Can only load ctc files" thrown in GoogleChrome/lighthouse.
Source
Thrown at core/scripts/i18n/bake-ctc-to-lhl.js:102
}
// Check that all placeholders are gone.
if (message.match(/\$\w+\$/)) {
throw Error(`Message "${message}" is missing placeholder(s): ${message.match(/\$\w+\$/g)}`);
}
bakedMessages[key] = {message};
}
return bakedMessages;
}
/**
* @param {string} file
* @return {Record<string, CtcMessage>}
*/
function loadCtcStrings(file) {
if (!file.endsWith('.ctc.json')) throw new Error('Can only load ctc files');
return readJson(file);
}
/**
* @param {string} path
* @param {Record<string, LhlMessage>} localeStrings
*/
function saveLhlStrings(path, localeStrings) {
fs.writeFileSync(path, JSON.stringify(localeStrings, null, 2) + '\n');
}
/**
* @param {string} dir
* @return {Array<string>}
*/
function collectAndBakeCtcStrings(dir) {
const lhlFilenames = [];View on GitHub (pinned to 9515cd4e58)
Solutions
- Pass a .ctc file as input to the script.
- Convert the file to CTC format before baking it to LHL.
When it happens
Trigger: Raised when bake-ctc-to-lhl is given a file that is not a .ctc file.
Common situations: See trigger scenarios.
AI-assisted analysis of GoogleChrome/lighthouse@9515cd4e58 (2026-08-13).
Data as JSON: /api/errors/a9ce0073e4c60aca.
Report an issue: GitHub.