Skip to content

v11 EMFILE: too many open files on Windows #11412

@jeremymeng

Description

@jeremymeng

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

No response

Which area(s) of pnpm are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

On Windows

Describe the Bug

pnpm exit with the following error. Is there a limit on how many items pass to Promise.all? Re-run may get the installation to pass eventually.

$ pnpm i
Scope: all 456 workspace projects
 WARN  6 deprecated subdependencies found: @types/minimatch@6.0.0, glob@7.2.3, glob@8.1.0, inflight@1.0.6, prebuild-install@7.1.3, rimraf@3.0.2
Already up to date
Progress: resolved 1383, reused 1328, downloaded 0, added 0, done
 EMFILE  EMFILE: too many open files, open 'D:\git\jsmain\sdk\maps\maps-search-rest\node_modules\.bin\autorest'

pnpm: EMFILE: too many open files, open 'D:\git\jsmain\sdk\maps\maps-search-rest\node_modules\.bin\autorest'
    at async open (node:internal/fs/promises:637:25)
    at async Object.writeFile (node:internal/fs/promises:1239:14)
    at async writeShim (file:///C:/Users/yumeng/AppData/Roaming/fnm/node-versions/v24.14.0/installation/node_modules/pnpm/dist/pnpm.mjs:75769:3)
    at async Promise.all (index 0)
    at async cmdShim (file:///C:/Users/yumeng/AppData/Roaming/fnm/node-versions/v24.14.0/installation/node_modules/pnpm/dist/pnpm.mjs:75689:3)
    at async linkBin (file:///C:/Users/yumeng/AppData/Roaming/fnm/node-versions/v24.14.0/installation/node_modules/pnpm/dist/pnpm.mjs:76443:5)
    at async Promise.allSettled (index 0)
    at async _linkBins (file:///C:/Users/yumeng/AppData/Roaming/fnm/node-versions/v24.14.0/installation/node_modules/pnpm/dist/pnpm.mjs:76299:19)
    at async file:///C:/Users/yumeng/AppData/Roaming/fnm/node-versions/v24.14.0/installation/node_modules/pnpm/dist/pnpm.mjs:157703:32
    at async Promise.all (index 272)

Expected Behavior

no error from pnpm

Which Node.js version are you using?

24.14.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions