{"record":{"id":"0371632cb0e04597","repo":"GoogleChrome/lighthouse","slug":"invalid-gatherer-type","errorCode":null,"errorMessage":"Invalid Gatherer type ","messagePattern":"Invalid Gatherer type ","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/config/config-helpers.js","lineNumber":174,"sourceCode":" * Input Examples:\n *  - 'my-gatherer'\n *  - class MyGatherer extends Gatherer { }\n *  - {instance: myGathererInstance}\n *\n * @param {LH.Config.GathererJson} gatherer\n * @return {{instance?: Gatherer, implementation?: GathererConstructor, path?: string}}\n */\nfunction expandGathererShorthand(gatherer) {\n  if (typeof gatherer === 'string') {\n    // just 'path/to/gatherer'\n    return {path: gatherer};\n  } else if ('implementation' in gatherer || 'instance' in gatherer) {\n    // {implementation: GathererConstructor, ...} or {instance: GathererInstance, ...}\n    return gatherer;\n  } else if ('path' in gatherer) {\n    // {path: 'path/to/gatherer', ...}\n    if (typeof gatherer.path !== 'string') {\n      throw new Error('Invalid Gatherer type ' + JSON.stringify(gatherer));\n    }\n    return gatherer;\n  } else if (typeof gatherer === 'function') {\n    // just GathererConstructor\n    return {implementation: gatherer};\n  } else if (gatherer && typeof gatherer.getArtifact === 'function') {\n    // just GathererInstance\n    return {instance: gatherer};\n  } else {\n    throw new Error('Invalid Gatherer type ' + JSON.stringify(gatherer));\n  }\n}\n\n/**\n * 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 */","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/config/config-helpers.js#L156-L192","documentation":"Error \"Invalid Gatherer type \" thrown in GoogleChrome/lighthouse.","triggerScenarios":"Thrown when a configured gatherer does not extend the Gatherer base class or fails gatherer validation.","commonSituations":"See trigger scenarios.","solutions":["Ensure the gatherer module exports a class that extends the base Gatherer class.","Check that the gatherer's implementation path in your config points to the correct file.","Verify the gatherer 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"}