{"record":{"id":"91fd33d2cb21a73f","repo":"gatsbyjs/gatsby","slug":"plugin-plugin-resolve-has-an-invalid-options","errorCode":null,"errorMessage":"Plugin \"${plugin.resolve}\" has an invalid options schema so we cannot verify your configuration for it.","messagePattern":"Plugin \"(.+?)\" has an invalid options schema so we cannot verify your configuration for it\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/bootstrap/load-plugins/validate.ts","lineNumber":325,"sourceCode":"                return schema.$_setFlag(`entry`, args.entry, { clone: true })\n              }\n              return schema\n            },\n          }\n        }),\n      })\n\n      // If rootDir and plugin.parentDir are the same, i.e. if this is a plugin a user configured in their gatsby-config.js (and not a sub-theme that added it), this will be \"\"\n      // Otherwise, this will contain (and show) the relative path\n      const configDir =\n        (plugin.parentDir &&\n          rootDir &&\n          path.relative(rootDir, plugin.parentDir)) ||\n        null\n\n      if (!Joi.isSchema(optionsSchema) || optionsSchema.type !== `object`) {\n        // Validate correct usage of pluginOptionsSchema\n        reporter.warn(\n          `Plugin \"${plugin.resolve}\" has an invalid options schema so we cannot verify your configuration for it.`\n        )\n        return plugin\n      }\n\n      try {\n        if (!optionsSchema.describe().keys.plugins) {\n          // All plugins have \"plugins: []\"\" added to their options in load.ts, even if they\n          // do not have subplugins. We add plugins to the schema if it does not exist already\n          // to make sure they pass validation.\n          optionsSchema = optionsSchema.append({\n            plugins: Joi.array().length(0),\n          })\n        }\n\n        const { value, warning } = await validateOptionsSchema(\n          optionsSchema,\n          (plugin.options as IPluginInfoOptions) || {}","sourceCodeStart":307,"sourceCodeEnd":343,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/bootstrap/load-plugins/validate.ts#L307-L343","documentation":"Startup validation warning: a plugin exports pluginOptionsSchema, but the exported value is not a valid Joi schema (Joi.isSchema failed), so gatsby cannot validate or normalize that plugin's options from gatsby-config.js. The plugin still loads with its raw, unvalidated options.","triggerScenarios":"Thrown at packages/gatsby/src/bootstrap/load-plugins/validate.ts:325 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the plugin's pluginOptionsSchema export so it returns a Joi schema built via Joi.object()...","Upgrade the affected plugin — a released fix may already exist","Manually verify the options you pass to the plugin, since they are no longer validated"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}