gatsbyjs/gatsby · error
MissingResource
MissingResource
Error message
error copying file from ${details.absolutePath} to ${publicPath} What it means
Error "error copying file from ${details.absolutePath} to ${publicPath}" thrown in gatsbyjs/gatsby.
Source
Thrown at packages/gatsby-source-filesystem/src/extend-file-node.js:39
resolve: (file, fieldArgs, context) => {
const details = getNodeAndSavePathDependency(file.id, context.path)
const fileName = `${file.internal.contentDigest}/${details.base}`
const publicPath = path.join(
process.cwd(),
`public`,
`static`,
fileName
)
if (!fs.existsSync(publicPath)) {
fs.copySync(
details.absolutePath,
publicPath,
{ dereference: true },
err => {
if (err) {
reporter.panic(
{
id: prefixId(CODES.MissingResource),
context: {
sourceMessage: `error copying file from ${details.absolutePath} to ${publicPath}`,
},
},
err
)
}
}
)
}
return `${pathPrefix}/static/${fileName}`
},
},
}
}View on GitHub (pinned to 8b06340921)
Solutions
- Check the source file exists and is readable at the logged absolutePath.
- Verify the build process has write permission to the public directory and enough free disk space.
When it happens
Trigger: Thrown at packages/gatsby-source-filesystem/src/extend-file-node.js:39 when the library encounters an invalid state.
Common situations: Occurs when copying a file node into the public folder fails, typically due to filesystem permissions or a missing source file. Check that the source path exists and the process can write to the public directory.
AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13).
Data as JSON: /api/errors/58667d1d9b6da848.
Report an issue: GitHub.