GoogleChrome/lighthouse · error · Error
module '${requirePath}' missing default export
Error message
module '${requirePath}' missing default export What it means
Error "module '${requirePath}' missing default export" thrown in GoogleChrome/lighthouse.
Source
Thrown at core/config/config-helpers.js:249
} else {
requirePath += '.js';
module = await import(requirePath);
}
if (module.default) return module.default;
// Find a valid named export.
const methods = new Set(['meta']);
const possibleNamedExports = Object.keys(module).filter(key => {
if (!(module[key] && module[key] instanceof Object)) return false;
return Object.getOwnPropertyNames(module[key]).some(method => methods.has(method));
});
if (possibleNamedExports.length === 1) return possibleNamedExports[0];
if (possibleNamedExports.length > 1) {
throw new Error(`module '${requirePath}' has too many possible exports`);
}
throw new Error(`module '${requirePath}' missing default export`);
}
/**
* @param {string} gathererPath
* @param {Array<string>} coreGathererList
* @param {string=} configDir
* @return {Promise<LH.Config.AnyGathererDefn>}
*/
async function requireGatherer(gathererPath, coreGathererList, configDir) {
const coreGatherer = coreGathererList.find(a => a === `${gathererPath}.js`);
let requirePath = `../gather/gatherers/${gathererPath}`;
if (!coreGatherer) {
// Otherwise, attempt to find it elsewhere. This throws if not found.
requirePath = resolveModulePath(gathererPath, configDir, 'gatherer');
}
const GathererClass = /** @type {GathererConstructor} */ (await requireWrapper(requirePath));View on GitHub (pinned to 9515cd4e58)
Solutions
- Add a default export to the module, e.g. `export default class MyAudit extends Audit {...}`.
- Check that the file path in your config matches the module you intended to load.
When it happens
Trigger: Thrown when resolving a plugin or custom module that does not provide a default export.
Common situations: See trigger scenarios.
AI-assisted analysis of GoogleChrome/lighthouse@9515cd4e58 (2026-08-13).
Data as JSON: /api/errors/248aeb03256f8acd.
Report an issue: GitHub.