{"record":{"id":"70961bd826cd999a","repo":"gatsbyjs/gatsby","slug":"gatsby-source-filesystem-10001","errorCode":"gatsby-source-filesystem_10001","errorMessage":"error copying file from ${details.absolutePath} to ${publicPath}","messagePattern":"error copying file from (.+?) to (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-filesystem/src/extend-file-node.js","lineNumber":39,"sourceCode":"      resolve: (file, fieldArgs, context) => {\n        const details = getNodeAndSavePathDependency(file.id, context.path)\n        const fileName = `${file.internal.contentDigest}/${details.base}`\n\n        const publicPath = path.join(\n          process.cwd(),\n          `public`,\n          `static`,\n          fileName\n        )\n\n        if (!fs.existsSync(publicPath)) {\n          fs.copySync(\n            details.absolutePath,\n            publicPath,\n            { dereference: true },\n            err => {\n              if (err) {\n                reporter.panic(\n                  {\n                    id: prefixId(CODES.MissingResource),\n                    context: {\n                      sourceMessage: `error copying file from ${details.absolutePath} to ${publicPath}`,\n                    },\n                  },\n                  err\n                )\n              }\n            }\n          )\n        }\n\n        return `${pathPrefix}/static/${fileName}`\n      },\n    },\n  }\n}","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-source-filesystem/src/extend-file-node.js#L21-L57","documentation":"extend-file-node's publicURL-style resolver copies the source file into public/static/<contentDigest>/ on first request; this panic fires from the copy callback when fs.copySync reports an error (permissions, missing source, disk issue) while copying details.absolutePath to publicPath.","triggerScenarios":"Thrown at packages/gatsby-source-filesystem/src/extend-file-node.js:39 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the source file exists and is readable at the absolute path","Fix filesystem permissions/disk space in public/static","Clear public/ and rebuild to retry the copy"],"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"}