Skip to content

unstable_middleware not working with the Cloudflare templateΒ #13181

Open
@alexanderson1993

Description

@alexanderson1993

I'm using React Router as a...

framework

Reproduction

Clone https://github.com/alexanderson1993/cloudflare-middleware
Install dependencies
Run npm run dev
Open in a browser

System Info

System:
    OS: macOS 15.1.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 91.67 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 23.6.0 - /opt/homebrew/bin/node
    Yarn: 4.5.3 - /opt/homebrew/bin/yarn
    npm: 10.9.2 - /opt/homebrew/bin/npm
    bun: 1.2.0 - ~/.bun/bin/bun
    Watchman: 2024.12.02.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 133.0.6943.142
    Safari: 18.1.1
  npmPackages:
    @react-router/dev: ^7.3.0 => 7.3.0 
    @react-router/node: ^7.3.0 => 7.3.0 
    @react-router/serve: ^7.3.0 => 7.3.0 
    react-router: ^7.3.0 => 7.3.0 
    vite: ^5.4.11 => 5.4.14

Used Package Manager

npm

Expected Behavior

It should display the default React Router template welcome page

Actual Behavior

It throws Error: No value found for context

Note: I have also tried this with the latest version of Vite and it still failed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions