Skip to content

React 19 + Cloudflare Adapter -> "Bug: Uncaught ReferenceError: MessageChannel is not defined" #12824

@ethanniser

Description

@ethanniser

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

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

originally shared facebook/react#31827 but I think it makes sense to be an issue here as I doubt its a react issue

image

It doesn't happen during build but instead during the "Deploying to Cloudflare's global network" step

What's the expected result?

The error should not happen

Link to Minimal Reproducible Example

https://github.com/phase/test-astro-react19-cf-workers (thank you @phase)

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly impacts performance (priority)help wantedPlease help with this issue!pkg: cloudflareRelated to the Cloudflare adapter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions