gatsbyjs/gatsby · error
Couldn't find any supported Gatsby Node API's in ${initialAp
Error message
Couldn't find any supported Gatsby Node API's in ${initialApiNameString} What it means
findApiName takes a pipe-delimited string of candidate Gatsby Node API lifecycle names (e.g. 'onPluginInit|unstable_onPluginInit') and uses gatsby-plugin-utils' isGatsbyNodeLifecycleSupported to pick the first one the running Gatsby version supports. If none of the candidates are supported — and the require() of gatsby-plugin-utils did not itself throw — this error fires. The require() failure path is handled separately (it falls back to the first candidate).
Source
Thrown at packages/gatsby-source-wordpress/src/utils/run-steps.ts:107
try {
const { isGatsbyNodeLifecycleSupported } = require(`gatsby-plugin-utils`)
for (const apiName of potentialApiNames) {
if (isGatsbyNodeLifecycleSupported(apiName)) {
return apiName
}
}
} catch (e) {
console.error(
`Could not check if Gatsby supports node API's [${potentialApiNames.join(
`, `
)}]. Trying to use the first available API name (${potentialApiNames[0]})`
)
return potentialApiNames[0]
}
throw new Error(
`Couldn't find any supported Gatsby Node API's in ${initialApiNameString}`
)
}
const runApiSteps = (steps: Array<Step>, apiName: string): IGatsbyApiHook =>
wrapApiHook(
async (
helpers: GatsbyNodeApiHelpers,
pluginOptions: IPluginOptions
): Promise<void> => runSteps(steps, helpers, pluginOptions, apiName)
)
export { runSteps, runApiSteps, findApiName }
View on GitHub (pinned to 8b06340921)
Solutions
- Upgrade or downgrade gatsby-source-wordpress and Gatsby core to a mutually compatible pair.
- Inspect the pipe-delimited API name string passed to runApiSteps for typos.
- Confirm gatsby-plugin-utils is installed and resolves (the catch path handles require failure; this throw only fires when require succeeded but no candidate matched).
- If the error appears after a Gatsby upgrade, pin gatsby-source-wordpress to a version that supports the new lifecycle names.
Example fix
null
Defensive patterns
Strategy: validation
Validate before calling
const { isGatsbyNodeLifecycleSupported } = require('gatsby-plugin-utils')
const supported = candidates.some(isGatsbyNodeLifecycleSupported)
if (!supported) { throw new Error(`No supported Gatsby lifecycle in [${candidates.join(', ')}]; check Gatsby/gatsby-source-wordpress version compatibility`) } Type guard
const isSupportedLifecycle = (name) => { try { return require('gatsby-plugin-utils').isGatsbyNodeLifecycleSupported(name) } catch { return false } } Try / catch
null
Prevention
- Keep gatsby-source-wordpress and gatsby core on compatible versions
- Avoid editing the pipe-delimited lifecycle strings in run-steps
- Run a fresh gatsby clean after upgrading Gatsby to refresh the lifecycle support map
When it happens
Trigger: The candidate API names string is empty or contains only names no Gatsby version recognizes; a typo in the pipe-delimited string; running against a Gatsby version so old that even the legacy names are not listed; a future Gatsby that removed the listed APIs entirely.
Common situations: Editing run-steps with a mistyped lifecycle name; running gatsby-source-wordpress on an incompatible (too old or too new) Gatsby core; custom build of Gatsby that does not register the lifecycle support map; a regression that drops the pipe-delimited string to a single unsupported name.
Related errors
- createNodeId must be a function, was ${typeof createNodeId}
- createNode must be a function, was ${typeof createNode}
- Neither "cache" or "getCache" was passed. getCache must be f
- ${REPORTER_PREFIX} Error in default page filter
- ${REPORTER_PREFIX} Error in custom page filter. If you've cu
AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13).
Data as JSON: /api/errors/195de637a304245f.
Report an issue: GitHub.