Skip to content

[BUG] Next.js 16.1.0 crashes on Cloudflare Workers (Error 1101): Cannot assign to read only property 'setImmediate' of [object Module] #1049

@Kenzo-Wada

Description

@Kenzo-Wada

Describe the bug

After upgrading to Next.js 16.1.0, the Worker crashes on startup on Cloudflare Workers with Error 1101.

The exception is:
TypeError: Cannot assign to read only property 'setImmediate' of object '[object Module]'

The stack trace points to:
next/dist/server/node-environment-extensions/fast-set-immediate.external.js
and the app never serves the request.

Steps to reproduce

  1. Deploy a Next.js app to Cloudflare Workers using @opennextjs/cloudflare (OpenNext).
  2. Ensure wrangler has nodejs_compat enabled.
  3. Upgrade Next.js to 16.1.0.
  4. Build & deploy.
  5. Request / -> Worker throws TypeError and Cloudflare reports Error 1101.

Repro notes:

  • Works with Next.js 16.0.x (downgrading avoids the crash).

Expected behavior

The Worker should start and serve requests normally (e.g. GET / returns the page) without throwing a startup exception.

@opennextjs/cloudflare version

1.14.6

Wrangler version

4.56.0

next info output

Operating System:
  Platform: linux
  Arch: x64
  Version: #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2
  Available memory (MB): 30716
  Available CPU cores: 16
Binaries:
  Node: 24.12.0
  npm: 11.7.0
  Yarn: 4.12.0
  pnpm: 10.24.0
Relevant Packages:
  next: 16.1.0 // Latest available version is detected (16.1.0).
  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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions