Skip to content

[BUG] EMFILE: too many open files #670

Open
@Antoine4011

Description

@Antoine4011

I'm moving from next on pages to the open next adapter.
I can successfully deploy from local but when trying to setup github deployment, I keep getting this error during dependencies install.

15:43:50.155 | .../node_modules/@swc/core postinstall: Done
-- | --
15:43:50.376 | ../../node_modules/lmdb install$ node-gyp-build-optional-packages
15:43:50.504 | ../../node_modules/lmdb install: Done
15:43:50.779 | EMFILE  EMFILE: too many open files, open '/opt/buildhome/repo/apps/nextjs/node_modules/bundle-require/package.yaml'
15:43:50.780 |  
15:43:50.781 |  
15:43:50.781 |  
15:43:51.206 | Failed: error occurred while installing tools or dependencies

I've found several questions asked on the cloudflare discord related to this but no response (https://discord.com/channels/595317990191398933/1347568839382138910 and https://discord.com/channels/595317990191398933/1363620455730253905), so I'm trying here.

Appreciate any help :)

Steps to reproduce

Not reproductible on local

Expected behavior

Installation succeed

@opennextjs/cloudflare version

1.0.2

Wrangler version

4.15.1

next info output

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.12.2
  npm: 10.5.0
  Yarn: N/A
  pnpm: 10.8.1
Relevant Packages:
  next: 15.3.2 // Latest available version is detected (15.3.2).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions