Open elie222 opened 1 week ago
Hi elie222 thank you for reporting.
Have you followed at all the details outlined here related to upgrading to React v19 - https://www.sanity.io/help/react-19
I can confirm I also have the same issue. I was playing around with this repo https://github.com/sanity-io/sanity-template-vercel-visual-editing upgrading it the newest versions. I followed the guidance in the react 19 upgrade page referenced. But the issue persists. I'm just commenting out all icons in the schemas currently.
Sorry, I actually solved this. I think I hadn't updated on my packages.
Thanks for joining this issue @paulmains-epam.
I have tried a fresh Next.js 15 and React 19 with embedded Sanity Studio and didn't encounter these issues.
We've narrowed this issue, at least in @elie222 case down to ReactPortal
(https://github.com/tajo/react-portal#readme) which hasn't receive updates for many years and guarantees support only up to React 16. Perhaps you could look for an alternative. Because of this, it's quite likely there are multiple version of @types/react
being used in your build? You could verify with npm ls @types/react
to see if there's any use of a version <18.x.x
This code has a TypeScript error when updating to Next 15 (React 19):
Error: