{"record":{"id":"7a4018de3bf92674","repo":"GoogleChrome/lighthouse","slug":"invalid-audit-type","errorCode":null,"errorMessage":"Invalid Audit type ","messagePattern":"Invalid Audit type ","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/config/config-helpers.js","lineNumber":207,"sourceCode":" * Expands the audits from user-specified JSON to an internal audit definition format.\n * @param {LH.Config.AuditJson} audit\n * @return {{id?: string, path: string, options?: {}} | {id?: string, implementation: Audit, path?: string, options?: {}}}\n */\nfunction expandAuditShorthand(audit) {\n  if (typeof audit === 'string') {\n    // just 'path/to/audit'\n    return {path: audit, options: {}};\n  } else if ('implementation' in audit && typeof audit.implementation.audit === 'function') {\n    // {implementation: AuditClass, ...}\n    return audit;\n  } else if ('path' in audit && typeof audit.path === 'string') {\n    // {path: 'path/to/audit', ...}\n    return audit;\n  } else if ('audit' in audit && typeof audit.audit === 'function') {\n    // just AuditClass\n    return {implementation: audit, options: {}};\n  } else {\n    throw new Error('Invalid Audit type ' + JSON.stringify(audit));\n  }\n}\n\n/** @type {Map<string, Promise<any>>} */\nconst bundledModules = new Map(/* BUILD_REPLACE_BUNDLED_MODULES */);\n\n/**\n * Wraps `import`/`require` with an entrypoint for bundled dynamic modules.\n * See build-bundle.js\n * @param {string} requirePath\n */\nasync function requireWrapper(requirePath) {\n  // For windows.\n  if (path.isAbsolute(requirePath)) {\n    requirePath = url.pathToFileURL(requirePath).href;\n  }\n\n  /** @type {any} */","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/config/config-helpers.js#L189-L225","documentation":"Error \"Invalid Audit type \" thrown in GoogleChrome/lighthouse.","triggerScenarios":"Thrown when a configured audit does not extend the Audit base class or fails audit validation.","commonSituations":"See trigger scenarios.","solutions":["Ensure the audit module exports a class that extends the base Audit class.","Check that the audit's path in your config points to the correct file.","Verify the audit class is exported as the default export."],"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"}