{"record":{"id":"248aeb03256f8acd","repo":"GoogleChrome/lighthouse","slug":"module-requirepath-missing-default-export","errorCode":null,"errorMessage":"module '${requirePath}' missing default export","messagePattern":"module '(.+?)' missing default export","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/config/config-helpers.js","lineNumber":249,"sourceCode":"  } else {\n    requirePath += '.js';\n    module = await import(requirePath);\n  }\n\n  if (module.default) return module.default;\n\n  // Find a valid named export.\n  const methods = new Set(['meta']);\n  const possibleNamedExports = Object.keys(module).filter(key => {\n    if (!(module[key] && module[key] instanceof Object)) return false;\n    return Object.getOwnPropertyNames(module[key]).some(method => methods.has(method));\n  });\n  if (possibleNamedExports.length === 1) return possibleNamedExports[0];\n  if (possibleNamedExports.length > 1) {\n    throw new Error(`module '${requirePath}' has too many possible exports`);\n  }\n\n  throw new Error(`module '${requirePath}' missing default export`);\n}\n\n/**\n * @param {string} gathererPath\n * @param {Array<string>} coreGathererList\n * @param {string=} configDir\n * @return {Promise<LH.Config.AnyGathererDefn>}\n */\nasync function requireGatherer(gathererPath, coreGathererList, configDir) {\n  const coreGatherer = coreGathererList.find(a => a === `${gathererPath}.js`);\n\n  let requirePath = `../gather/gatherers/${gathererPath}`;\n  if (!coreGatherer) {\n    // Otherwise, attempt to find it elsewhere. This throws if not found.\n    requirePath = resolveModulePath(gathererPath, configDir, 'gatherer');\n  }\n\n  const GathererClass = /** @type {GathererConstructor} */ (await requireWrapper(requirePath));","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/config/config-helpers.js#L231-L267","documentation":"Error \"module '${requirePath}' missing default export\" thrown in GoogleChrome/lighthouse.","triggerScenarios":"Thrown when resolving a plugin or custom module that does not provide a default export.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9515cd4e58ebed69f78742d932b501c2cab8ad8f","analyzedAt":"2026-08-13T06:28:10.346Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}