Describe the bug
When I try to deploy a project with a proxy.js file, it gives an error that Node.js middleware isn't currently supported. This is even though the file is supposed to be edge unless a Node API is used, which is what I did.
Steps to reproduce
- Make a new cloudflare project
- add a
proxy.ts file with the following content:
import { type NextRequest, NextResponse } from 'next/server';
export default async function proxy(req: NextRequest) {
return response;
}
- Run the deploy step (
opennextjs-cloudflare deploy)
- Get an error about only edge middleware being supported
Expected behavior
This should build properly as it imports no Node APIs, and is thus edge only.
@opennextjs/cloudflare version
1.19.11
Wrangler version
4.49.0
next info output
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.4.0: Thu Mar 19 19:33:09 PDT 2026; root:xnu-12377.101.15~1/RELEASE_ARM64_T8112
Available memory (MB): 24576
Available CPU cores: 8
Binaries:
Node: 25.5.0
npm: 11.8.0
Yarn: 1.22.19
pnpm: 9.4.0
Relevant Packages:
next: 16.2.3 // There is a newer version (16.2.7) available, upgrade recommended!
eslint-config-next: N/A
react: 19.2.3
react-dom: 19.2.3
typescript: 5.9.3
Next.js Config:
output: N/A
Additional context
No response
Describe the bug
When I try to deploy a project with a
proxy.jsfile, it gives an error that Node.js middleware isn't currently supported. This is even though the file is supposed to be edge unless a Node API is used, which is what I did.Steps to reproduce
proxy.tsfile with the following content:opennextjs-cloudflare deploy)Expected behavior
This should build properly as it imports no Node APIs, and is thus edge only.
@opennextjs/cloudflare version
1.19.11
Wrangler version
4.49.0
next info output
Additional context
No response