We're encountering an issue in our Prismic project where the preview button returns a 500 Internal Server Error instead of functioning as expected. We've thoroughly checked our project settings, and everything seems to be configured properly based on the documentation.
For reference, I’ve attached a screenshot of our settings configuration, and you can also view the issue in this video link:
To note, we're using Next.js (app router) on the Edge Runtime through Cloudflare Pages. I also saw the comment from October 2022 in this community post stating that the Edge Runtime for Prismic previews wasn't supported at that time. Could you please confirm if this is still the case?
Your help with this matter would be highly appreciated.
Thank you for your response. I apologise for the broken video link in my previous post. I've attached a screenshot for your reference, and unfortunately, the issue is still persisting.
I appreciate you looking into the Edge Runtime limitation from Next.js. Please let me know if there are any updates.
Hi @varsha.rana, both @prismicio/next and @prismicio/react are not compatible with Cloudflare Pages and Vercel's Edge Runtime.
We are planning to update both packages to support modern runtimes, including Cloudflare Pages and Vercel's Edge Runtime.
The current versions were designed for older bundlers and runtimes which have problems with native ESM. Now that Node.js and other runtimes have caught up to ESM, we we can publish a breaking change that brings compatibility with new environments.
Although we don't have a firm timeline to share, we are actively working on it at the moment. Keep an eye out for a release announcement here: Releases · prismicio/prismic-next · GitHub
Thanks for the update! It’s great to hear that support for modern runtimes like Cloudflare Pages and Vercel’s Edge Runtime is in the works. Looking forward to the release—I'll keep an eye on the GitHub Releases page for updates. Appreciate the team's efforts on this!