{"record":{"id":"30990309ff068581","repo":"gatsbyjs/gatsby","slug":"your-gatsby-config-js-format-is-currently-not-supp","errorCode":null,"errorMessage":"Your gatsby-config.js format is currently not supported by Gatsby Admin. Please share your gatsby-config.js file via the \"Send feedback\" button. Thanks!","messagePattern":"Your gatsby-config\\.js format is currently not supported by Gatsby Admin\\. Please share your gatsby-config\\.js file via the \"Send feedback\" button\\. Thanks!","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"deprecated-packages/gatsby-recipes/src/providers/gatsby/plugin.js","lineNumber":491,"sourceCode":"            const { node } = path\n            const { left, right } = node.expression\n\n            if (!isDefaultExport(left)) {\n              return\n            }\n\n            const plugins = right.properties.find(p => p.key.name === `plugins`)\n\n            let pluginsList = []\n\n            if (t.isCallExpression(plugins.value)) {\n              pluginsList = plugins.value.callee.object?.elements\n            } else {\n              pluginsList = plugins.value.elements\n            }\n\n            if (!pluginsList) {\n              throw new Error(\n                `Your gatsby-config.js format is currently not supported by Gatsby Admin. Please share your gatsby-config.js file via the \"Send feedback\" button. Thanks!`\n              )\n            }\n\n            pluginsList.map(node => {\n              this.state.push(getPlugin(node))\n            })\n          },\n        },\n      }\n    })\n  }\n}\n\nexport { addPluginToConfig, getPluginsFromConfig, removePluginFromConfig }\nexport { create, create as update, read, destroy }\n\nexport const config = {}","sourceCodeStart":473,"sourceCodeEnd":509,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/deprecated-packages/gatsby-recipes/src/providers/gatsby/plugin.js#L473-L509","documentation":"Thrown in the AST traversal of gatsby-config.js inside gatsby-recipes (plugin.js ~line 491). After locating the `plugins` property, the code reads either `plugins.value.callee.object.elements` (for a call expression like `[...].concat(...)`) or `plugins.value.elements` (a plain array). If neither branch yields a list (`pluginsList` is null/undefined), the config format is unparseable by Gatsby Admin.","triggerScenarios":"A gatsby-config.js whose `plugins` field is not a simple array literal or `.concat(...)` call — e.g. assigned via a function call returning an array, a conditional/spread-only expression, or a require()'d external module exporting the plugins array.","commonSituations":"Refactoring gatsby-config.js to compute plugins dynamically (`plugins: getPlugins()`); splitting config across multiple files; using `...require('./plugins')` patterns; switching to ESM/TypeScript config formats Gatsby Admin's static analyzer cannot traverse.","solutions":["Rewrite gatsby-config.js so `plugins` is a literal array (possibly ending in `.concat(...)`).","Avoid wrapping `plugins` in a function call or assignment the static reader cannot follow.","Report the config format via the 'Send feedback' button as the message suggests, then simplify the config locally."],"exampleFix":"// before — plugins assigned from a function\nmodule.exports = {\n  plugins: buildPlugins(),\n}\n\n// after — literal array\nmodule.exports = {\n  plugins: [\n    `gatsby-plugin-react-helmet`,\n    `gatsby-plugin-mdx`,\n  ],\n}","handlingStrategy":"validation","validationCode":"const parser = require('@babel/parser')\nfunction configPluginsIsLiteralArray(configSrc) {\n  const ast = parser.parse(configSrc, { sourceType: 'script', plugins: ['jsx'] })\n  // walk module.exports.plugins and assert it is an ArrayExpression or .concat call\n  return true // implement the check\n}","typeGuard":"function isLiteralPluginsArray(node) {\n  return node.type === 'ArrayExpression' ||\n    (node.type === 'CallExpression' && node.callee.property?.name === 'concat')\n}","tryCatchPattern":null,"preventionTips":["Keep gatsby-config.js plugins as a literal array.","Avoid wrapping plugins in function calls Gatsby Admin cannot follow.","Test config changes through Gatsby Admin if you use it."],"tags":["recipes","gatsby-config","ast","parsing","deprecated"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}