GoogleChrome/lighthouse · error · Error
`lighthouse:default` is the only valid extension method.
Error message
`lighthouse:default` is the only valid extension method.
What it means
Thrown by resolveExtensions in config.js. A config may declare 'extends' to build on the default Lighthouse config, but the only accepted value is the string 'lighthouse:default'. Any other extends value is unsupported and throws. Lighthouse does not support arbitrary multi-config inheritance chains.
Source
Thrown at core/config/config.js:86
// The directory of the config path, if one was provided.
const configDir = configPath ? path.dirname(configPath) : undefined;
return {
configWorkingCopy: deepCloneConfigJson(config),
configPath,
configDir,
};
}
/**
* @param {LH.Config} config
* @return {LH.Config}
*/
function resolveExtensions(config) {
if (!config.extends) return config;
if (config.extends !== 'lighthouse:default') {
throw new Error('`lighthouse:default` is the only valid extension method.');
}
const {artifacts, ...extensionJSON} = config;
const defaultClone = deepCloneConfigJson(defaultConfig);
const mergedConfig = mergeConfigFragment(defaultClone, extensionJSON);
mergedConfig.artifacts = mergeConfigFragmentArrayByKey(
defaultClone.artifacts,
artifacts,
artifact => artifact.id
);
return mergedConfig;
}
/**
* Looks up the required artifact IDs for each dependency, throwing if no earlier artifact satisfies the dependency.
*View on GitHub (pinned to 9515cd4e58)
Solutions
- Set extends: 'lighthouse:default' (the only supported value) and override individual keys.
- If you need another preset as a base, import that preset object and spread/merge it yourself instead of using extends.
- Remove the extends key if you are providing a fully standalone config.
Example fix
// before
module.exports = {extends: 'lighthouse:full', audits: [...]};
// after
module.exports = {extends: 'lighthouse:default', audits: [...]}; Defensive patterns
Strategy: validation
Validate before calling
if (config.extends !== undefined && config.extends !== 'lighthouse:default') {
throw new Error("config.extends may only be 'lighthouse:default'");
} Type guard
function extendsIsValid(v) { return v === undefined || v === 'lighthouse:default'; } Try / catch
try { const cfg = new Config(config, {configPath}); }
catch (e) { if (/only valid extension method/.test(e.message)) config.extends = 'lighthouse:default'; throw e; } Prevention
- Only use extends: 'lighthouse:default'.
- To combine presets, merge objects manually instead of extending arbitrary names.
When it happens
Trigger: A custom config sets extends: 'lighthouse:full' or extends: './other-config.js' or extends: 'lighthouse:desktop'. resolveExtensions sees a non-matching value and config.js:86 throws.
Common situations: Assuming other preset names (e.g. 'lighthouse:full','lighthouse:perf') are valid extends targets. Trying to extend a local config file. Outdated docs suggesting extends values that were never supported.
Related errors
- ${pluginName} has an invalid category description.
- ${pluginName} has an invalid category manualDescription.
- ${pluginName} supportedModes must be an array, valid array v
- ${pluginName} groups json is not defined as an object.
- ${pluginName} has a group not defined as an object.
AI-assisted analysis of GoogleChrome/lighthouse@9515cd4e58 (2026-08-13).
Data as JSON: /api/errors/6666374a513aa68c.
Report an issue: GitHub.