{"record":{"id":"aac4134ec34c0de4","repo":"facebook/docusaurus","slug":"unrecognized-keys-object-keys-rest-join","errorCode":null,"errorMessage":"Unrecognized keys ${Object.keys(rest).join(', ')} found in preset-classic configuration. The allowed keys are debug, docs, blog, pages, sitemap, theme, googleAnalytics, gtag, and googleTagManager. Check the documentation: https://docusaurus.io/docs/using-plugins#docusauruspreset-classic for more information on how to configure individual plugins.","messagePattern":"Unrecognized keys (.+?) found in preset-classic configuration\\. The allowed keys are debug, docs, blog, pages, sitemap, theme, googleAnalytics, gtag, and googleTagManager\\. Check the documentation: https://docusaurus\\.io/docs/using-plugins#docusauruspreset-classic for more information on how to configure individual plugins\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/docusaurus-preset-classic/src/index.ts","lineNumber":108,"sourceCode":"  if (gtag) {\n    plugins.push(makePluginConfig('@docusaurus/plugin-google-gtag', gtag));\n  }\n  if (googleTagManager) {\n    plugins.push(\n      makePluginConfig(\n        '@docusaurus/plugin-google-tag-manager',\n        googleTagManager,\n      ),\n    );\n  }\n  if (sitemap !== false && (isProd || debug)) {\n    plugins.push(makePluginConfig('@docusaurus/plugin-sitemap', sitemap));\n  }\n  if (svgr !== false) {\n    plugins.push(makePluginConfig('@docusaurus/plugin-svgr', svgr));\n  }\n  if (Object.keys(rest).length > 0) {\n    throw new Error(\n      `Unrecognized keys ${Object.keys(rest).join(\n        ', ',\n      )} found in preset-classic configuration. The allowed keys are debug, docs, blog, pages, sitemap, theme, googleAnalytics, gtag, and googleTagManager. Check the documentation: https://docusaurus.io/docs/using-plugins#docusauruspreset-classic for more information on how to configure individual plugins.`,\n    );\n  }\n\n  return {themes, plugins};\n}\n\nexport type {Options, ThemeConfig};\n","sourceCodeStart":90,"sourceCodeEnd":119,"githubUrl":"https://github.com/facebook/docusaurus/blob/3f483e80e326cc646b54b83d564b3f0c4881b9a6/packages/docusaurus-preset-classic/src/index.ts#L90-L119","documentation":"Thrown by preset-classic when, after destructuring the known option keys (debug, docs, blog, pages, sitemap, svgr, theme, gtag, googleTagManager, googleAnalytics), the rest object still has keys. Any unrecognized top-level preset option is rejected and the allowed set is printed along with a docs link. Note 'svgr' is accepted by code though not listed in the message text.","triggerScenarios":"Passing a misspelled or removed preset option, e.g. presets: [['classic', { doc: {...} }]] (typo), or a removed option like 'googleAnalytics' after the v4 guard, or any extra key not in the allowed list.","commonSituations":"Typos (doc/docs, teme/theme); options from outdated tutorials; options that belong on themeConfig placed on the preset; leftover keys after upgrades.","solutions":["Remove or rename the unrecognized keys listed in the message to match an allowed key.","If the option targets a specific plugin, pass it under the correct sub-key (e.g. docs, blog, pages).","If it's a theme option, move it to themeConfig instead of the preset."],"exampleFix":"// before\npresets: [['classic', { doc: { sidebarCollapsed: false } }]]\n// after\npresets: [['classic', { docs: { sidebarCollapsed: false } }]]","handlingStrategy":"validation","validationCode":"const allowed = new Set(['debug','docs','blog','pages','sitemap','svgr','theme','gtag','googleTagManager','googleAnalytics']);\nconst unknown = Object.keys(presetOptions).filter(k => !allowed.has(k));\nif (unknown.length) throw new Error(`Unknown preset keys: ${unknown.join(', ')}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Type preset options against the published Options type to catch typos at compile time.","Keep theme-only settings in themeConfig, not on the preset."],"tags":["preset-classic","config-validation","typo"],"backgroundTag":null,"analyzedSha":"3f483e80e326cc646b54b83d564b3f0c4881b9a6","analyzedAt":"2026-08-12T13:25:04.382Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}