gatsbyjs/gatsby · error
Your gatsby-config.js format is currently not supported by G
Error message
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!
What it means
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.
Source
Thrown at deprecated-packages/gatsby-recipes/src/providers/gatsby/plugin.js:491
const { node } = path
const { left, right } = node.expression
if (!isDefaultExport(left)) {
return
}
const plugins = right.properties.find(p => p.key.name === `plugins`)
let pluginsList = []
if (t.isCallExpression(plugins.value)) {
pluginsList = plugins.value.callee.object?.elements
} else {
pluginsList = plugins.value.elements
}
if (!pluginsList) {
throw new Error(
`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!`
)
}
pluginsList.map(node => {
this.state.push(getPlugin(node))
})
},
},
}
})
}
}
export { addPluginToConfig, getPluginsFromConfig, removePluginFromConfig }
export { create, create as update, read, destroy }
export const config = {}View on GitHub (pinned to 8b06340921)
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.
Example fix
// before — plugins assigned from a function
module.exports = {
plugins: buildPlugins(),
}
// after — literal array
module.exports = {
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-plugin-mdx`,
],
} Defensive patterns
Strategy: validation
Validate before calling
const parser = require('@babel/parser')
function configPluginsIsLiteralArray(configSrc) {
const ast = parser.parse(configSrc, { sourceType: 'script', plugins: ['jsx'] })
// walk module.exports.plugins and assert it is an ArrayExpression or .concat call
return true // implement the check
} Type guard
function isLiteralPluginsArray(node) {
return node.type === 'ArrayExpression' ||
(node.type === 'CallExpression' && node.callee.property?.name === 'concat')
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Did not recognize ${curr}
- MissingInfoError
- A recipe must be specified
- ${JSON.stringify(result)}
- {"fetchError":"Could not fetch ${pathOrUrl} from official re
AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13).
Data as JSON: /api/errors/30990309ff068581.
Report an issue: GitHub.