{"record":{"id":"bdf6de1eca6333b9","repo":"GoogleChrome/lighthouse","slug":"module-requirepath-has-too-many-possible-expo","errorCode":null,"errorMessage":"module '${requirePath}' has too many possible exports","messagePattern":"module '(.+?)' has too many possible exports","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/config/config-helpers.js","lineNumber":246,"sourceCode":"    module = await bundledModules.get(requirePath);\n  } else if (requirePath.match(/\\.(js|mjs|cjs)$/)) {\n    module = await import(requirePath);\n  } 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');","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/config/config-helpers.js#L228-L264","documentation":"Error \"module '${requirePath}' has too many possible exports\" thrown in GoogleChrome/lighthouse.","triggerScenarios":"Thrown when resolving a plugin or custom module whose exports are ambiguous, so Lighthouse cannot pick the implementation.","commonSituations":"See trigger scenarios.","solutions":["Export only one class from the module, or add a default export so Lighthouse knows which export to use.","Remove extra named exports that could be confused with the audit/gatherer class."],"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"}