[GH-ISSUE #720] Incompatibility issues #151

Open
opened 2026-05-06 12:37:40 +02:00 by BreizhHardware · 1 comment

Originally created by @abersheeran on GitHub (Mar 30, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/720

[vinext] middleware.ts is deprecated in Next.js 16. Rename to proxy.ts and export a default or named proxy function.
Using secrets defined in .env.local
Error: Calling `require` for "punycode/" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.
    at runInRunnerObject (workers/runner-worker/index.js:104:3)
    at getWorkerEntryExportTypes (workers/runner-worker/index.js:243:24)
    at null.<anonymous> (workers/runner-worker/index.js:347:37)
    at maybeCaptureError (workers/runner-worker/index.js:50:10) {
  [cause]: undefined
}
Originally created by @abersheeran on GitHub (Mar 30, 2026). Original GitHub issue: https://github.com/cloudflare/vinext/issues/720 ``` [vinext] middleware.ts is deprecated in Next.js 16. Rename to proxy.ts and export a default or named proxy function. Using secrets defined in .env.local Error: Calling `require` for "punycode/" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details. at runInRunnerObject (workers/runner-worker/index.js:104:3) at getWorkerEntryExportTypes (workers/runner-worker/index.js:243:24) at null.<anonymous> (workers/runner-worker/index.js:347:37) at maybeCaptureError (workers/runner-worker/index.js:50:10) { [cause]: undefined } ```
Author
Owner

@southpolesteve commented on GitHub (Apr 10, 2026):

Could you share a minimal repro for this?

A few details that would help:

  • Are you seeing this in vinext dev, vinext build, or wrangler dev?
  • Can you paste your middleware.ts or proxy.ts file?
  • Which package is pulling in punycode/?
  • Can you share package.json, vite.config.*, and wrangler.jsonc?
  • What versions are you using for vinext, vite, @cloudflare/vite-plugin, wrangler, and Node?
  • If possible, please include a small reproduction in a public github repo
  • The middleware.ts is deprecated line is expected on Next.js 16 projects, so the main thing to debug is the require("punycode/") failure and exactly which command/path triggers it.
<!-- gh-comment-id:4219981611 --> @southpolesteve commented on GitHub (Apr 10, 2026): Could you share a minimal repro for this? A few details that would help: - Are you seeing this in vinext dev, vinext build, or wrangler dev? - Can you paste your middleware.ts or proxy.ts file? - Which package is pulling in punycode/? - Can you share package.json, vite.config.*, and wrangler.jsonc? - What versions are you using for vinext, vite, @cloudflare/vite-plugin, wrangler, and Node? - If possible, please include a small reproduction in a public github repo - The middleware.ts is deprecated line is expected on Next.js 16 projects, so the main thing to debug is the require("punycode/") failure and exactly which command/path triggers it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#151
No description provided.