React SSR on Cloudflare Workers fails due to missing MessageChannel API
Ran into an interesting issue deploying an Astro site using workers (not pages. instead serving static assets using worker): The React renderer fails with MessageChannel is not defined error when trying to do server-side rendering in Workers.
Has anyone found a clean workaround for this?
2 Replies
astro issue and workaround: https://github.com/withastro/astro/issues/12824
workers runtime: https://github.com/cloudflare/workerd/issues/3273
GitHub
React 19 + Cloudflare Adapter -> "Bug: Uncaught ReferenceError: Mes...
Astro Info Astro v5.1.1 Node v22.6.0 System macOS (arm64) Package Manager bun Output server Adapter @astrojs/cloudflare Integrations @astrojs/mdx @astrojs/sitemap @astrojs/tailwind @astrojs/react I...
GitHub
Runtime APIs: MessageChannel · Issue #3273 · cloudflare/workerd
The MessageChannel API is available on node but not CF Workers. This is causing an issue during the deployment of sites using React 19 + Astro + Workers, see facebook/react#31827 and withastro/astr...
Спасибо