{"record":{"id":"5d71d528830707b2","repo":"GoogleChrome/lighthouse","slug":"unable-to-locate-moduleidentifier-tried-5d71d5","errorCode":null,"errorMessage":"Unable to locate `${moduleIdentifier}`.\n     Tried to resolve the module from these locations:\n       ${getModuleDirectory(import.meta)}\n       ${cwdPath}\n       ${relativePath}","messagePattern":"Unable to locate `(.+?)`\\.\n     Tried to resolve the module from these locations:\n       (.+?)\n       (.+?)\n       (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/config/config-helpers.js","lineNumber":545,"sourceCode":"  const relativePath = path.resolve(configDir, moduleIdentifier);\n  try {\n    return require.resolve(relativePath);\n  } catch (requireError) {}\n\n  // 5.\n  // Lighthouse globally installed, node_modules/ in config directory.\n  // ex: lighthouse https://test.com --config-path=./config/config.js\n  //\n  // working directory/\n  //   |-- config/\n  //     |-- node_modules/\n  //     |-- config.js\n  //     |-- package.json\n  try {\n    return require.resolve(moduleIdentifier, {paths: [configDir]});\n  } catch (requireError) {}\n\n  throw new Error(errorString + `\n       ${relativePath}`);\n}\n\n/**\n * Many objects in the config can be an object whose properties are not serializable.\n * We use a shallow clone for these objects instead.\n * Any value that isn't an object will not be cloned.\n *\n * @template T\n * @param {T} item\n * @return {T}\n */\nfunction shallowClone(item) {\n  if (typeof item === 'object') {\n    // Return copy of instance and prototype chain (in case item is instantiated class).\n    return Object.assign(\n      Object.create(\n        Object.getPrototypeOf(item)","sourceCodeStart":527,"sourceCodeEnd":563,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/config/config-helpers.js#L527-L563","documentation":"Error \"Unable to locate `${moduleIdentifier}`.\n     Tried to resolve the module from these locations:\n       ${getModuleDirectory(import.meta)}\n       ${cwdPath}\n       ${relativePath}\" thrown in GoogleChrome/lighthouse.","triggerScenarios":"Thrown when a config-referenced module cannot be resolved from the Lighthouse module directory, the current working directory, or a relative config path.","commonSituations":"See trigger scenarios.","solutions":["Verify the module path or package name is spelled correctly in your config.","Install the module with npm/yarn if it is an external package.","Check the relative path listed and make sure the file exists at one of the tried locations."],"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"}