GatsbyCloud build fails with "lerna ENOENT" in monorepo setup

7 replies
Last updated: Jan 12, 2026
This is a GatsbyCloud + Lerna question, but before creating a GitHub issue I thought I’d ask.
Builds on GC fail since a week ago. Believe it’s not honoring the base directory site setting. It works fine on Netlify and locally.

My guess is GC isn’t looking out for the multi-package repo scenario, and a change on their end broke that ability?


ERROR Failed to compile: Error: Command failed with ENOENT: lerna bootstrap --registry=<https://registry.npmjs.org/>
spawn lerna ENOENT
AI Update

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 thread
7 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.

Was this answer helpful?