Resolving issues with Next.js live preview and Sanity's stega integration

12 replies
Last updated: Jun 6, 2024
Hi I'm having an issue with using the presentation tool in an existing project following the nextjs app router live preview guide , the document locations panel on the right is giving an error. I'm not sure if anyone has faced anything similar before ?
May 29, 2024, 7:41 PM
What versions of your Sanity packages are you running?
May 29, 2024, 7:45 PM
Hi i'm running v ^3.36.4
May 29, 2024, 7:46 PM
Can you upgrade to the latestversion of everything?
May 29, 2024, 7:52 PM
Thanks will give that a go now 💪
May 29, 2024, 8:22 PM
Thanks all resolved, have some updating to do to match my document types but think i'm all good 🙌
May 29, 2024, 8:40 PM
Great!
May 29, 2024, 8:47 PM
Sorry just one other question - i seem to get a nextjs error when i enable stega in my web app client config (trying to do this as i assume it's required to get the live previews to work i.e viewing real-time changes in the blog when making changes to the document.) . The error is
Error: Unsupported Server Component type: undefined
- just wondering if this is perhaps an issue with my components or if there's something around using stega i need to change. I'm working locally so when i enable stega i use my local studio url as the studioUrl .
May 29, 2024, 10:25 PM
Hey
user C
, I’m experiencing the same issue, it seemed to come out of nowhere. Were you able to resolve this issue?
Jun 6, 2024, 6:04 PM
Yup
user T
, i just updated my sanity package to the latest . Or do you mean the stega issue ?
Jun 6, 2024, 6:06 PM
I was referring to the
Error: Unsupported Server Component type: undefined
issue
Jun 6, 2024, 6:16 PM
Yeah i had that when trying to enable stega - i didn’t manage to resolve this but didn’t need to use stega so just didn’t use it . I’d suggest maybe asking in the channel for this - would be interested to know the reason for that error too
Jun 6, 2024, 6:19 PM
It was my error! in pursuit of resolving another error I commented out one of my components 😅
Jun 6, 2024, 11:10 PM

Sanity– build remarkable experiences at scale

Sanity is a modern 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?