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

  1. Clear the .cache and public directories and rebuild so stale owner references are gone.
  2. Ensure the owner plugin is installed and enabled in gatsby-config.js.
  3. 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

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


AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13). Data as JSON: /api/errors/77d5d5044bebfcc4. Report an issue: GitHub.