GoogleChrome/lighthouse · error · Error

${pluginName} has an invalid audits array.

Error message

${pluginName} has an invalid audits array.

What it means

Error "${pluginName} has an invalid audits array." thrown in GoogleChrome/lighthouse.

Source

Thrown at core/config/config-plugin.js:79

}

/**
 * A set of methods for extracting and validating a Lighthouse plugin config.
 */
class ConfigPlugin {
  /**
   * Extract and validate the list of AuditDefns added by the plugin (or undefined
   * if no additional audits are being added by the plugin).
   * @param {unknown} auditsJson
   * @param {string} pluginName
   * @return {Array<{path: string}>|undefined}
   */
  static _parseAuditsList(auditsJson, pluginName) {
    // Plugin audits aren't required (relying on LH default audits) so fall back to [].
    if (auditsJson === undefined) {
      return undefined;
    } else if (!isArrayOfUnknownObjects(auditsJson)) {
      throw new Error(`${pluginName} has an invalid audits array.`);
    }

    return auditsJson.map(auditDefnJson => {
      const {path, ...invalidRest} = auditDefnJson;
      assertNoExcessProperties(invalidRest, pluginName, 'audit');

      if (typeof path !== 'string') {
        throw new Error(`${pluginName} has a missing audit path.`);
      }
      return {
        path,
      };
    });
  }

  /**
   * Extract and validate the list of category AuditRefs added by the plugin.
   * @param {unknown} auditRefsJson

View on GitHub (pinned to 9515cd4e58)

Solutions

  1. Provide `audits` as an array of objects with a `path` property, e.g. audits: [{path: 'lighthouse-plugin-example/audits/my-audit.js'}].
  2. Make sure the audits value is an array, not an object or string.

When it happens

Trigger: Thrown when a plugin's audits field is present but is not a valid array.

Common situations: See trigger scenarios.


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