Open
Description
Summary
Netlify build fuils very often with `Error: Couldn't find temp query result for ""

Some have suggesed to add gatsby clean to our build command but I don't think that is a proper solution.
Even after "Clean and Retry from latest commit option" is still happening
Steps to reproduce
Build on netlify and gatsby.
A link to a reproduction repository
No response
Plugin version
3.8.1
More information about your build
- I am building using the CLI
- I am building using file-based configuration (
netlify.toml
)
What OS are you using?
Mac OS
Your netlify.toml file
`netlify.toml`
# Paste content of your `netlify.toml` file here
command = "node scripts/create-env.js && cross-env GATSBY_COMMIT_REF=$COMMIT_REF yarn build"
Configuration
`gatsby-config.js` and options
# Paste content of your `gatsby-config.js` file, and/or command line options here. Check there is no private info in there.
{
resolve: "gatsby-plugin-netlify",
options: {
generateMatchPathRewrites: false,
headers: {
"/*": ["Referrer-Policy: strict-origin-when-cross-origin"],
},
},
}
Environment
Environment
System:
OS: macOS 15.1.1
CPU: (8) arm64 Apple M1 Pro
Memory: 234.09 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
Yarn: 3.8.3 - ~/.nvm/versions/node/v22.11.0/bin/yarn
npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
Browsers:
Chrome: 134.0.6998.118
Edge: 134.0.3124.68
Safari: 18.1.1
npmPackages:
@netlify/plugin-gatsby: ^3.8.1 => 3.8.1
Gatsby info
gatsby info
System:
OS: macOS 15.1.1
CPU: (8) arm64 Apple M1 Pro
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
Yarn: 3.8.3 - ~/.nvm/versions/node/v22.11.0/bin/yarn
npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
Browsers:
Chrome: 134.0.6998.118
Edge: 134.0.3124.68
Safari: 18.1.1
npmPackages:
gatsby: ^5.11.0 => 5.11.0
gatsby-plugin-google-tagmanager: ^5.11.0 => 5.11.0
gatsby-plugin-image: ^3.11.0 => 3.11.0
gatsby-plugin-manifest: ^5.11.0 => 5.11.0
gatsby-plugin-material-ui: ^4.1.0 => 4.1.0
gatsby-plugin-netlify: 5.1.1 => 5.1.1
gatsby-plugin-nprogress: ^5.11.0 => 5.11.0
gatsby-plugin-robots-txt: ^1.8.0 => 1.8.0
gatsby-plugin-sharp: ^5.11.0 => 5.11.0
gatsby-plugin-sitemap: ^6.11.0 => 6.11.0
gatsby-plugin-webpack-bundle-analyser-v2: ^1.1.32 => 1.1.32
gatsby-source-filesystem: ^5.11.0 => 5.11.0
gatsby-source-sanity: 7.9.1 => 7.9.1
gatsby-transformer-sharp: ^5.11.0 => 5.11.0
Your _redirects file
`_redirects`
# Paste content of your `_redirects` file here
Builds logs (or link to your logs)
Build logs
12:01:51 PM: error Failed to write page-data for ""/it-it/blog/mono/ Couldn't find temp query result for "/it-it/blog/mono/".
12:01:51 PM:
12:01:51 PM: Error: Couldn't find temp query result for "/it-it/blog/mono".
12:01:51 PM: - page-data.ts:97 readPageQueryResult
12:01:51 PM: [c]/[gatsby]/src/utils/page-data.ts:97:9
12:01:51 PM:
12:01:51 PM: - page-data.ts:106 writePageData
12:01:51 PM: [c]/[gatsby]/src/utils/page-data.ts:106:18
12:01:51 PM:
12:01:51 PM: - page-data.ts:304
12:01:51 PM: [c]/[gatsby]/src/utils/page-data.ts:304:28
12:01:51 PM:
12:01:51 PM:
12:01:51 PM: not finished Writing page-data.json and slice-data.json files to public directory - 0.110s
12:01:53 PM:
12:01:53 PM: "build.command" failed
Function logs
Function logs
# Paste logs here