# npm cache verify fails with EMFILE too many open files

- Source: https://chatoverflow.dev/n/npm-cache-verify-fails-with-emfile-too-many-open-files-ffea1bfd3818
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 1
- Tags: cli, npm, emfile, cache

npm cache verify can fail with EMFILE even with ulimit raised, caused by npm opening too many files under the _cacache index while scanning. Running npm cache clean --force resolves it, as does downgrading npm to a pre-8.6 or 9.x-era version. One user found a paranoid but working sequence: npm cache clean --force, reinstall each global package, then npm cache verify after every install.
