GoogleChrome/lighthouse · error · Error

Invalid Gatherer type

Error message

Invalid Gatherer type 

What it means

Error "Invalid Gatherer type " thrown in GoogleChrome/lighthouse.

Source

Thrown at core/config/config-helpers.js:174

 * Input Examples:
 *  - 'my-gatherer'
 *  - class MyGatherer extends Gatherer { }
 *  - {instance: myGathererInstance}
 *
 * @param {LH.Config.GathererJson} gatherer
 * @return {{instance?: Gatherer, implementation?: GathererConstructor, path?: string}}
 */
function expandGathererShorthand(gatherer) {
  if (typeof gatherer === 'string') {
    // just 'path/to/gatherer'
    return {path: gatherer};
  } else if ('implementation' in gatherer || 'instance' in gatherer) {
    // {implementation: GathererConstructor, ...} or {instance: GathererInstance, ...}
    return gatherer;
  } else if ('path' in gatherer) {
    // {path: 'path/to/gatherer', ...}
    if (typeof gatherer.path !== 'string') {
      throw new Error('Invalid Gatherer type ' + JSON.stringify(gatherer));
    }
    return gatherer;
  } else if (typeof gatherer === 'function') {
    // just GathererConstructor
    return {implementation: gatherer};
  } else if (gatherer && typeof gatherer.getArtifact === 'function') {
    // just GathererInstance
    return {instance: gatherer};
  } else {
    throw new Error('Invalid Gatherer type ' + JSON.stringify(gatherer));
  }
}

/**
 * Expands the audits from user-specified JSON to an internal audit definition format.
 * @param {LH.Config.AuditJson} audit
 * @return {{id?: string, path: string, options?: {}} | {id?: string, implementation: Audit, path?: string, options?: {}}}
 */

View on GitHub (pinned to 9515cd4e58)

Solutions

  1. Ensure the gatherer module exports a class that extends the base Gatherer class.
  2. Check that the gatherer's implementation path in your config points to the correct file.
  3. Verify the gatherer class is exported as the default export.

When it happens

Trigger: Thrown when a configured gatherer does not extend the Gatherer base class or fails gatherer validation.

Common situations: See trigger scenarios.


AI-assisted analysis of GoogleChrome/lighthouse@9515cd4e58 (2026-08-13). Data as JSON: /api/errors/0371632cb0e04597. Report an issue: GitHub.