Skip to content

Errors on node versions after 22.13.0 #76900

Closed
@r34son

Description

@r34son

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/quizzical-shaw-5qj8pk?workspaceId=ws_LyqK2TEkFjjDL6sZSuBF9w

To Reproduce

Image

Bug in nodejs introduced in this commit nodejs/node@81c94a32e4
Here is the fix nodejs/node#56807

You can temporarily add workaround for this here:

const symbols = Object.getOwnPropertySymbols(signal)
  const kMaxEventTargetListeners = symbols.find(
    s => s.description === 'events.maxEventTargetListeners'
  )
  if (kMaxEventTargetListeners) {
    // The default events.defaultMaxListeners value is 10.
    // https://nodejs.org/api/events.html#eventsdefaultmaxlisteners
    signal[kMaxEventTargetListeners] = 10
  }

Current vs. Expected behavior

I faced errors in catchall api routes

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4242
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 15.2.2-canary.3 // Latest available version is detected (15.2.2-canary.3).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Runtime

Which stage(s) are affected? (Select all that apply)

Other (Deployed)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    RuntimeRelated to Node.js or Edge Runtime with Next.js.invalid linkThe issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions