Gatsby blog template build error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals

6 replies
Last updated: Jun 23, 2020
Hi, has anyone successfully used https://www.sanity.io/create?template=sanity-io%2Fsanity-template-gatsby-blog recently?
getting a build error “Cannot find module ‘@babel/compat-data/corejs3-shipped-proposals’” right out the box
AI Update

I need to be upfront with you: that template URL appears to be returning a 404 error, which suggests the Gatsby blog template may no longer be available or has been moved/deprecated.

This isn't surprising given that Gatsby's ecosystem has significantly slowed down in recent years, and Sanity has shifted focus to more actively maintained frameworks. Many older Gatsby templates are no longer being updated.

If you're set on using Gatsby with Sanity:

You could try looking for community-maintained alternatives or building from scratch using the gatsby-source-sanity plugin, but you may encounter ongoing maintenance issues with outdated dependencies (like the Cannot find module '@babel/compat-data/corejs3-shipped-proposals' error you're seeing, which is a Babel dependency mismatch).

My honest recommendation:

If you're starting a new project, consider using Next.js with Sanity instead. Here's why:

  • Active maintenance: Sanity's Next.js integration is actively developed and supported
  • Modern features: You get access to the Live Content API for real-time updates, Sanity Functions for serverless compute, and better tooling overall
  • Current templates: The Next.js starter templates are regularly updated and tested
  • Better DX: TypeScript support, better performance, and more predictable builds

You can get started quickly with:

npx create-sanity@latest --template blog

This gives you a modern blog setup with Next.js that won't have the dependency issues you're encountering.

If you absolutely need Gatsby, I'd recommend reaching out on the Sanity Discord community to see if anyone has a working fork or alternative, but be prepared that you may need to build something custom or deal with ongoing dependency conflicts.

Show original thread
6 replies
i tried switching to node 13 in netlify with no luck
if anyone has any ideas please let me know\
it seems a bit weird that something that is suppose to show how easy sanity is totally fails …
Sorry about this! There might've been some outdated lock-files or somesuch. We’ll look into it tomorrow – thanks for letting us know
Hi Piotr, there was an upstream issue with Node/babel and, as a result, we had to upgrade our dependencies. Apologies for the rough start you had with our Gatsby template - this should now be fixed! 🙂
Hi Piotr, there was an upstream issue with Node/babel and, as a result, we had to upgrade our dependencies. Apologies for the rough start you had with our Gatsby template - this should now be fixed! 🙂

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?