-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Open
Labels
accepting-prsIdentifies issues/proposals that we are accepting community PRs forIdentifies issues/proposals that we are accepting community PRs forbugfeat:vitepkg:@react-router/dev
Description
Reproduction
- Clone the repository https://github.com/chrisvltn/react-router-issue-reproduction
git clone https://github.com/chrisvltn/react-router-issue-reproduction.git
- Run
pnpm install - Run
pnpm dev - Open the dev environment in the browser
You'll see errors when importing node-specific libraries (http, https, etc.).
This reproduction environment uses the Cloudflare official template as base.
The fix branch shows a workaround fix - to add a custom Vite plugin that removes the node conditions in vite.config.ts.
System Info
System:
OS: macOS 15.7.2
CPU: (10) arm64 Apple M1 Max
Memory: 2.11 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 25.3.0
npm: 11.7.0
pnpm: 10.26.0
Browsers:
Chrome: 143.0.7499.193
Edge: 143.0.3650.139
Firefox: 139.0.4
Firefox Nightly: 131.0a1
Safari: 18.6
Safari Technology Preview: 26.0
npmPackages:
@react-router/dev: ^7.10.0 => 7.12.0
react-router: ^7.10.0 => 7.12.0
vite: ^7.1.7 => 7.3.1Used Package Manager
pnpm
Expected Behavior
Page to load normally
Actual Behavior
Build breaks, as node versions of the dependency is used, which are incompatible with workers environment.
Metadata
Metadata
Assignees
Labels
accepting-prsIdentifies issues/proposals that we are accepting community PRs forIdentifies issues/proposals that we are accepting community PRs forbugfeat:vitepkg:@react-router/dev