Build Fails When Using Sanity Create Templates with No Error Details

9 replies
Last updated: May 23, 2020
I'm trying to set up a new site with the create templates. I've tried both the kitchen sink and the Gatsby blog but get errors every time I try to set it up. I don't get any error information; only that the build failed. See attached screenshot.
I simply filled out the forms on this page:
https://www.sanity.io/create?template=sanity-io%2Fsanity-template-gatsby-blog and it errorred. This has happened numerous times and I am unable to build any site.
Any help appreciated.
AI Update

I can see you're experiencing build failures with the Gatsby blog template from sanity.io/create. Unfortunately, this web-based template creation system appears to have been deprecated or significantly changed - the URL you're using may no longer be functional.

Based on the current Sanity documentation on templates, many older templates that relied on Sanity Studio v2 have not been migrated to v3, and the Gatsby ecosystem templates may be among those affected. The platform has shifted toward a more modern approach for getting started.

Here's the recommended path forward:

The current best practice is to use the Sanity CLI to initialize new projects with npm create sanity@latest. This gives you:

  • Better error messages when something goes wrong
  • More control over the setup process
  • Support for modern frameworks like Next.js, Nuxt, and Astro
  • Up-to-date templates maintained for Studio v3

To get started:

npm create sanity@latest

This will walk you through an interactive setup including authentication, project creation, dataset configuration, and template selection. The CLI approach is more reliable than the web-based template creator and is what Sanity currently recommends.

If you specifically need Gatsby:

While Gatsby templates still exist in the Sanity ecosystem (95 templates are listed), many may be outdated. You have two options:

  1. Browse the current Gatsby templates on Sanity Exchange and look for community-maintained options that are actively updated
  2. Consider using Next.js instead - it has better support with 382+ templates and is more actively maintained in the Sanity ecosystem

Why the web-based creator may be failing:

The sanity.io/create interface was designed for older template systems and may not be receiving active maintenance. The shift to CLI-based initialization gives developers more transparency and better debugging capabilities when issues arise.

If you're committed to Gatsby specifically, I'd recommend checking individual template repositories on GitHub to verify they're still maintained, or consider starting with the CLI and manually integrating Gatsby with your Sanity project using their official source plugin. The Gatsby integration with Sanity remains solid - it's just the automated template deployment that may have changed.

Show original thread
9 replies
user B
Not sure if this is helpful, but I had this problem a few days ago—I ended up finding that there was a disparity between the Netlify account and my Github I was using—to be specific, I was trying to provision a repo and deploy from my personal GitHub, and had given access to my agencies Netlify instance to handle deployment, where my Github had never been authorized.
Not sure how/why this disparity contributed to the failed deployments, but going in to make sure I was properly authorized on both Github and Netlify in my browser fixed the issue for me.
As a side note, the portfolio setup is the first one that worked—curious if you would be able to deploy that one, or not
user P
I only have 1 account each for Sanity, github, & Netlify so I cant imagine that’d be it but then again I’m an amateur dev so I may have screwed up accounts. Worth investigating.
I was logged in to all accounts on the same browser window when I tried it.

I may have tried the portfolio starter before. I don’t recall. I am 99% sure I’d gotten the blog starter to work but (for some reason I don’t recall) I’d deleted it (probably was an early experiment as I tried to figure it all out so it was deleted to restart from scratch).

But I’ll try the portfolio starter again now.
In that case, I would double check that the sanity and netlify projects, as well as the github repo from previous deployments have all been deleted—may be a naming conflict, seeing something in one place or another and thinking "oh, hey, I already exist here" and failing
I do get a naming conflict error on the repo, even though I've double checked and verified the old repo was deleted and no other repo has that name.
This time, with the portfolio starter, I just ran with the default repo name. Everything worked.

Odd but at least I have something to start working on.

Greatly appreciate your help.
Ahh, interesting. Well, that's all I've got—good luck!
Like I said, your input helped. I have something to play with now! 🙂
Hi Rich, thanks for notifying. Not sure what this error is but we will look into it. It should not be naming error, that should be detected and get a specific message in the flow.
Hi again Rich, we think actually this one had to do with Gitub having some downtime, and also logs tells us that we did not manage to connect to github. Could you please try again, and let us now if it works?

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?