Summary
wrangler@4.86.0 through 4.95.x fail on Windows + Node 24 with ERR_UNSUPPORTED_ESM_URL_SCHEME during the autoconfig spawn. This forces our project to pin to wrangler@3.114.16 (last version before autoconfig), which in turn creates a peer-dependency conflict with @opennextjs/cloudflare@1.10.0 (declares peer wrangler@^4.38.0) — currently working around via npm ci --legacy-peer-deps.
Framing this as blocking @opennextjs/cloudflare compatibility on Windows since the workaround silently allows a version mismatch the adapter author explicitly disallowed.
Environment
- OS: Windows 11 Home 10.0.26200
- Shell: PowerShell
- Node: v24.14.1
- wrangler (current, working): 3.114.16
- wrangler (broken on this stack): 4.86.0 through 4.95.x (latest tested)
- @opennextjs/cloudflare: 1.10.0
Repro
- Fresh Node 24 on Windows 11
npx wrangler@4.86.0 deploy (or any 4.86+ command that triggers autoconfig)
- Error fires during the autoconfig child-process spawn
Error
ERR_UNSUPPORTED_ESM_URL_SCHEME
Root cause appears to be the autoconfig feature spawning a child process with an import() of a Windows drive-letter path (C:\...) that doesn't get URL-encoded to file:///C:/... before being passed to the ESM loader. Node 24's stricter ESM scheme handling rejects bare drive-letter paths.
Impact
- Cannot use any wrangler 4.x on Windows + Node 24
- Pin to wrangler 3.x means
@opennextjs/cloudflare@1.18+ is unreachable (it requires Next 15+ AND wrangler 4+)
npm ci requires --legacy-peer-deps to satisfy the conflicting peer dep against @opennextjs/cloudflare
- Downgrading Node to 20.x is a non-starter for projects depending on Node 24 features
Workaround
- Pin
wrangler@3.114.16 (last version without autoconfig)
- Run
npm ci --legacy-peer-deps to bypass peer-dep enforcement
Asks
- Confirm whether this is known and tracked elsewhere
- Fix the autoconfig child-process URL handling on Windows
- Once fixed, re-test on Node 24 LTS specifically (not just 22)
Happy to provide stack traces, repro repo, or test a candidate fix if useful.
Summary
wrangler@4.86.0through4.95.xfail on Windows + Node 24 withERR_UNSUPPORTED_ESM_URL_SCHEMEduring the autoconfig spawn. This forces our project to pin towrangler@3.114.16(last version before autoconfig), which in turn creates a peer-dependency conflict with@opennextjs/cloudflare@1.10.0(declarespeer wrangler@^4.38.0) — currently working around vianpm ci --legacy-peer-deps.Framing this as blocking @opennextjs/cloudflare compatibility on Windows since the workaround silently allows a version mismatch the adapter author explicitly disallowed.
Environment
Repro
npx wrangler@4.86.0 deploy(or any 4.86+ command that triggers autoconfig)Error
Root cause appears to be the autoconfig feature spawning a child process with an
import()of a Windows drive-letter path (C:\...) that doesn't get URL-encoded tofile:///C:/...before being passed to the ESM loader. Node 24's stricter ESM scheme handling rejects bare drive-letter paths.Impact
@opennextjs/cloudflare@1.18+is unreachable (it requires Next 15+ AND wrangler 4+)npm cirequires--legacy-peer-depsto satisfy the conflicting peer dep against@opennextjs/cloudflareWorkaround
wrangler@3.114.16(last version without autoconfig)npm ci --legacy-peer-depsto bypass peer-dep enforcementAsks
Happy to provide stack traces, repro repo, or test a candidate fix if useful.