Error with gatsby-source-sanity v7.6.0, revert to v7.5.1 for now

18 replies
Last updated: Dec 14, 2022
Hi, I just recently updated to Gatsby v5 and gatsby-source-sanity to v7.6.0. But when I start up the development server I get an error.
It’s and error #11321. You can checkout the screenshot below.
Nov 24, 2022, 1:41 PM
Hey
user K
👋I got this error this morning, it has been raised as an issue on
GitHub , best option is to revert to
7.5.1
for the time being
Nov 24, 2022, 4:37 PM
This is currently not working with Gatsby 4 as well. We were on gatsby-source-sanity 7.0.4. Upgraded to 7.5.1 to test and it still didn’t work. Running gatsby version 4.24.4. Is this an Sanity issue or a Gatsby issue?
Nov 24, 2022, 8:05 PM
Hey
user K
, in my case I'm using Gatsby
5.1.0
Nov 25, 2022, 8:56 AM
user K
I had to run
npm uninstall gatsby-source-sanity
and re-install
npm i gatsby-source-sanity@7.5.1
in order to downgrade and update my package-lock.json file. Once fully downloaded, this error goes away.
Nov 26, 2022, 4:15 PM
Hey
user T
thanks for that :) sorry for the cross channel posting but looks like Sanity is also aware and working with gatsby on a fix :) https://sanity-io-land.slack.com/archives/C9Z7RC3V1/p1669345406618619?thread_ts=1669345406.618619&cid=C9Z7RC3V1
Nov 26, 2022, 8:47 PM
Ah just ran into is, grateful it's not just me 😅
Nov 28, 2022, 5:24 PM
Same here, but all of my love and support to
user A
and team!
Nov 28, 2022, 10:47 PM
Since I had it set to ^7.5.1 in my npm package file, it picked up 7.6.0 on Gatsby cloud preview and broke everything. Maybe Sanity should made the new version ^8.0.0, just like all of the Gatsby plugins do that they maintain--aligning major versions with their releases, even if the change isn't that big, since the plugin 100% depends on Gatsby to work correctly.
Nov 29, 2022, 3:17 PM
Great idea 💡
Nov 29, 2022, 3:31 PM
Gatsby is actively pursuing this and would be grateful for a minimal repro project or steps that produces the behaviour
Dec 2, 2022, 11:58 AM
It's me, Dustin from Gatsby! Yes, we'd love to get this fixed but first we need to identify the problem.
If anyone has a Sanity site (ideally a simplified one) and a way we could reproduce it, we'd love to help all of you by addressing the fix. I don't
think it's related to Gatsby 5 (since apparently the issue persists on Gatsby 4?).
You can feel free to chime in on this issue and/or DM me or e-mail me at
dustin@gatsbyjs.com .

https://github.com/sanity-io/gatsby-source-sanity/issues/200
Dec 3, 2022, 12:39 AM
If helpful, we have a reasonably handy guide for simplified reproductions (which tend to get a little more complicated with CMSs). https://gatsby.dev/reproduction
Dec 3, 2022, 12:39 AM
I wonder if the Sanity/Gatsby blog starter has this problem--I can try this tonight. It's simply an install and then npm upgrade to 7.6.0
Dec 3, 2022, 12:46 AM
Been chatting with Dustin and even but just for transparencies sake of this channel, I have created a basic repo with the bug here: https://github.com/taulal/gatsby-source-sanity-bug-repo 🙂
Dec 4, 2022, 8:14 PM
We have opened an internal bug on this and are getting our team on it. Thank you Taylor for the simplified reproduction!!
Dec 8, 2022, 6:15 PM
We have fixed the issue and opened a PR for the Sanity team to review!

https://github.com/sanity-io/gatsby-source-sanity/pull/207
(It was a regression due to a version bump in the plugin of Axios)
Dec 14, 2022, 1:19 AM
Amazing Dustin thank you and the team heaps! :)
Dec 14, 2022, 1:21 AM
Ha, always one of the underlying packages! awesome work!
Dec 14, 2022, 2:28 AM

Sanity– build remarkable experiences at scale

The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?