GatsbyCloud build fails with "lerna ENOENT" in monorepo setup
This question is about Gatsby Cloud build infrastructure and Lerna monorepo configuration, which isn't related to Sanity. You'll want to reach out to Gatsby Cloud support or post in Gatsby-specific communities (like the Gatsby Discord or GitHub discussions) for help with this build issue.
That said, I should mention that Gatsby Cloud has been sunset - Netlify acquired Gatsby and shut down Gatsby Cloud in 2024. If you're still experiencing this issue, you'll need to migrate to another hosting platform.
Since you mentioned your builds work fine on Netlify, I'd recommend completing your migration there. The spawn lerna ENOENT error you're seeing on Gatsby Cloud is likely due to their build environment changes or deprecation-related infrastructure issues that won't be fixed.
For Gatsby projects in general (whether or not they use Sanity), popular hosting options include:
- Netlify (which you're already using successfully)
- Vercel
- Cloudflare Pages
If you're using Sanity as your content source and run into any Sanity-specific issues during your migration or build process (like webhook configuration, GROQ queries, or connecting to the Content Lake), feel free to ask here and we can help. For Gatsby Cloud platform issues, Netlify's support channels would be your best bet.
Show original thread7 replies
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.