Inconsistent build failures with Gatsby

Site names: ae-beta & ae-prod

package.json and versions:

We have been having this issue on our Gatsby web app for a while and have tried multiple approaches to resolve with no success. Builds on Netlify fail ~20% of the time. Local builds work 100% of the time.

Currently running gatsby version 4.21.0, I have also tried downgrading up upgrading (to version 5+ as well), and nothing has helped.

We tried running the build using a build hook leveraging the ?clear-cache=true param to force clearing the cache before the build starts, that also had no effect. See answer which gave that idea here.

Appears to possibly be related to Parallel Query Running, but it isn’t clear exactly how or what the resolution might be.

Build Settings:

Screenshot 2023-04-10 at 2.08.41 PM

Build errors I am seeing repeatedly (but not consistently):



Hiya, sorry you are having trouble with your build.

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile: Additionally, this Support Guide houses all of our resources for debugging build and deploy issues.

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!