-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
Describe the bug
When a route includes export const runtime = "edge", the build succeeds but the deployed route returns a 500 Internal Server Error with no helpful message. The docs say to remove edge runtime declarations, but there's no build-time or runtime warning when they're present.
Steps to reproduce
- Create a simple API route with edge runtime:
// src/app/api/health/route.ts
export const runtime = "edge"
export async function GET() {
return new Response(JSON.stringify({ status: "ok" }), {
headers: { "Content-Type": "application/json" },
})
}- Deploy with
opennextjs-cloudflare build && opennextjs-cloudflare deploy - Build succeeds, deployment succeeds
- Calling the endpoint returns
500 Internal Server Error - Remove
export const runtime = "edge", redeploy - Endpoint now returns
200 OK
Expected behavior
Either:
- Build should fail with a clear error message explaining edge runtime is not supported
- Or runtime should return a helpful error message instead of a generic 500
@opennextjs/cloudflare version
1.14.3
Wrangler version
4.52.1
next info output
Next.js 16.0.7
Additional context
The silent failure makes debugging difficult. I spent time investigating before discovering the issue was simply the presence of export const runtime = "edge".
Metadata
Metadata
Assignees
Labels
No labels