{"record":{"id":"5e5d440f749a3cce","repo":"GoogleChrome/lighthouse","slug":"pluginname-has-an-invalid-audits-array","errorCode":null,"errorMessage":"${pluginName} has an invalid audits array.","messagePattern":"(.+?) has an invalid audits array\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/config/config-plugin.js","lineNumber":79,"sourceCode":"}\n\n/**\n * A set of methods for extracting and validating a Lighthouse plugin config.\n */\nclass ConfigPlugin {\n  /**\n   * Extract and validate the list of AuditDefns added by the plugin (or undefined\n   * if no additional audits are being added by the plugin).\n   * @param {unknown} auditsJson\n   * @param {string} pluginName\n   * @return {Array<{path: string}>|undefined}\n   */\n  static _parseAuditsList(auditsJson, pluginName) {\n    // Plugin audits aren't required (relying on LH default audits) so fall back to [].\n    if (auditsJson === undefined) {\n      return undefined;\n    } else if (!isArrayOfUnknownObjects(auditsJson)) {\n      throw new Error(`${pluginName} has an invalid audits array.`);\n    }\n\n    return auditsJson.map(auditDefnJson => {\n      const {path, ...invalidRest} = auditDefnJson;\n      assertNoExcessProperties(invalidRest, pluginName, 'audit');\n\n      if (typeof path !== 'string') {\n        throw new Error(`${pluginName} has a missing audit path.`);\n      }\n      return {\n        path,\n      };\n    });\n  }\n\n  /**\n   * Extract and validate the list of category AuditRefs added by the plugin.\n   * @param {unknown} auditRefsJson","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/config/config-plugin.js#L61-L97","documentation":"Error \"${pluginName} has an invalid audits array.\" thrown in GoogleChrome/lighthouse.","triggerScenarios":"Thrown when a plugin's audits field is present but is not a valid array.","commonSituations":"See trigger scenarios.","solutions":["Provide `audits` as an array of objects with a `path` property, e.g. audits: [{path: 'lighthouse-plugin-example/audits/my-audit.js'}].","Make sure the audits value is an array, not an object or string."],"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"}