{"record":{"id":"1804a3989d3d761a","repo":"gatsbyjs/gatsby","slug":"could-not-find-function-loadnodecontent-for-plugin","errorCode":null,"errorMessage":"Could not find function loadNodeContent for plugin ${plugin.name}","messagePattern":"Could not find function loadNodeContent for plugin (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/utils/nodes.ts","lineNumber":60,"sourceCode":"  if (typeof node.internal.content === `string`) {\n    return node.internal.content\n  }\n\n  // Load plugin's loader function\n  const plugin = store\n    .getState()\n    .flattenedPlugins.find(plug => plug.name === node.internal.owner)\n\n  if (!plugin) {\n    throw new Error(\n      `Could not find owner plugin of node for loadNodeContent with owner \\`${node.internal.owner}\\``\n    )\n  }\n\n  const { loadNodeContent } = require(plugin.resolve)\n\n  if (!loadNodeContent) {\n    throw new Error(\n      `Could not find function loadNodeContent for plugin ${plugin.name}`\n    )\n  }\n\n  const content = await loadNodeContent(node)\n\n  node.internal.content = content\n\n  return content\n}\n","sourceCodeStart":42,"sourceCodeEnd":71,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby/src/utils/nodes.ts#L42-L71","documentation":"The owner plugin was found, but its main module does not export a loadNodeContent function. Plugins that own nodes needing content loading must implement this export so Gatsby can fetch raw content on demand.","triggerScenarios":"A plugin calls createNode for nodes that later require content loading, but the plugin's gatsby-node.js does not export loadNodeContent.","commonSituations":"Source plugin using createNode but forgetting loadNodeContent; a plugin version that dropped the export; transformer plugin expecting the source plugin to provide it.","solutions":["Implement and export loadNodeContent in the owning plugin's gatsby-node.js.","Upgrade the plugin to a version that ships loadNodeContent.","Set node.internal.content directly at createNode time to bypass lazy loading."],"exampleFix":"// before: plugin creates nodes but exports no loader -> [177]\nexports.sourceNodes = ({ actions }) => { actions.createNode({ ...node, internal: { owner: 'my-plugin' } }) }\n// after: export loadNodeContent\neasync function loadNodeContent(node) { return fs.readFile(node.absolutePath, 'utf8') }\nexports.loadNodeContent = loadNodeContent","handlingStrategy":"validation","validationCode":"function pluginExportsLoadNodeContent(plugin) {\n  const mod = require(plugin.resolve)\n  return typeof mod.loadNodeContent === 'function'\n}","typeGuard":"function hasLoadNodeContent(mod) { return typeof mod?.loadNodeContent === 'function' }","tryCatchPattern":null,"preventionTips":["Export loadNodeContent from any plugin whose nodes need lazy content loading.","Set node.internal.content directly at createNode time when content is cheap to load.","Pin the source plugin version that ships loadNodeContent."],"tags":["nodes","plugin"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}