{"record":{"id":"f217aef725e38945","repo":"gatsbyjs/gatsby","slug":"e-f217ae","errorCode":null,"errorMessage":"${e}","messagePattern":"\\$\\{e\\}","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-local-file-node.js","lineNumber":367,"sourceCode":"  }\n\n  // push it's id and url to our store for caching,\n  // so we can touch this node next time\n  // and so we can easily access the id by source url later\n  getStore().dispatch.imageNodes.pushNodeMeta({\n    id: remoteFileNode.id,\n    sourceUrl: mediaItemUrl,\n    modifiedGmt,\n  })\n\n  if (hardCacheMediaFiles) {\n    try {\n      // make sure the directory exists\n      await fs.ensureDir(path.dirname(hardCachedFilePath))\n      // copy our downloaded file to our existing directory\n      await fs.copyFile(remoteFileNode.absolutePath, hardCachedFilePath)\n    } catch (e) {\n      helpers.reporter.panic(e)\n    }\n  }\n\n  // and use it\n  return remoteFileNode\n}\n","sourceCodeStart":349,"sourceCodeEnd":374,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-local-file-node.js#L349-L374","documentation":"In createLocalFileNode, when hard-caching media files is enabled, the downloaded file is copied into the hard-cache directory; a throw from ensureDir/copyFile is escalated via reporter.panic with the original error. The input at fault is the local hard-cache path or disk state, not the remote file.","triggerScenarios":"Thrown at packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-local-file-node.js:367 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check permissions/disk space for the hard-cache directory","Delete the hard-cache directory and rebuild","Disable hardCacheMediaFiles if the cache target is unreliable"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}