Edge Runtime Preview Issue - 500 Internal Server Error

Hi Prismic Support Team,

I hope you're doing well.

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:

Recording of issue


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!

Best regards,
Varsha Rana

1 Like

Hi @varsha.rana, sorry we could not get back to your earlier.

It looks like your post is missing the video link (empty anchor tag).

Have you been able to resolve your issue?

I believe the Edge Runtime limitation was a limitation from Next.js, I'll look into it to see what's the status of that internally.

Best,
Lucie

Hi Lucie,

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.

Best,
Varsha

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

Hi @angeloashmore,

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!

Best,
Varsha