gatsbyjs/gatsby · error
Could not find owner plugin of node for loadNodeContent with
Error message
Could not find owner plugin of node for loadNodeContent with owner \`${node.internal.owner}\` What it means
loadNodeContent looks up the plugin whose name equals node.internal.owner in store.getState().flattenedPlugins; if no registered plugin matches that owner, it throws. The owner is set when a node is created and must correspond to a currently loaded plugin.
Source
Thrown at packages/gatsby/src/utils/nodes.ts:52
createPageDependency({ path, nodeId: id })
return node
}
/**
* Get content for a node from the plugin that created it.
*/
export async function loadNodeContent(node: IGatsbyNode): Promise<string> {
if (typeof node.internal.content === `string`) {
return node.internal.content
}
// Load plugin's loader function
const plugin = store
.getState()
.flattenedPlugins.find(plug => plug.name === node.internal.owner)
if (!plugin) {
throw new Error(
`Could not find owner plugin of node for loadNodeContent with owner \`${node.internal.owner}\``
)
}
const { loadNodeContent } = require(plugin.resolve)
if (!loadNodeContent) {
throw new Error(
`Could not find function loadNodeContent for plugin ${plugin.name}`
)
}
const content = await loadNodeContent(node)
node.internal.content = content
return content
}View on GitHub (pinned to 8b06340921)
Solutions
- Clear the .cache and public directories and rebuild so stale owner references are gone.
- Ensure the owner plugin is installed and enabled in gatsby-config.js.
- Set node.internal.owner to the real plugin name when creating nodes manually.
Defensive patterns
Strategy: validation
Validate before calling
const { store } = require('gatsby/dist/redux')
function ownerPluginIsLoaded(owner) {
return store.getState().flattenedPlugins.some(p => p.name === owner)
} Type guard
function ownerPluginExists(state, owner) { return state.flattenedPlugins.some(p => p.name === owner) } Prevention
- Clear .cache after disabling/renaming/removing a source plugin.
- Set node.internal.owner only to the real owning plugin name.
- Validate that owner plugins are present in gatsby-config before relying on loadNodeContent.
When it happens
Trigger: A node's internal.owner names a plugin not in flattenedPlugins (plugin uninstalled/renamed/disabled), or a node loaded from a stale .cache referencing an old plugin name.
Common situations: Disabling or renaming a source plugin after nodes were cached; stale .cache from a previous plugin set; manual node creation with a fabricated owner string.
Related errors
- Usage of "cache" instance in "onPreInit" API is not supporte
- Could not find function loadNodeContent for plugin ${plugin.
- You must specify either a cache or a directory
- Could not find matching operation for ${requestedPathOnDisk}
- Neither "cache" or "getCache" was passed. getCache must be f
AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13).
Data as JSON: /api/errors/77d5d5044bebfcc4.
Report an issue: GitHub.