browserify: Error: EMFILE on OSX when requiring lots of files
When requiring 256 files from a single file on OSX browserify throws:
Error: EMFILE, open '/Users/karl/Sites/KVP/GuruFramework/package.json'
From Googling around it looks like this is caused by attempting to open too many files in parallel.
It looks like this could be solved by using the graceful-fs module to limit the number of files opened in parallel.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 32 (3 by maintainers)
Commits related to this issue
- Added EMFILE limit change to fix browserify issue https://github.com/substack/node-browserify/issues/431 — committed to sharkinsspatial/.bash by sharkinsspatial 9 years ago
- Remove useFsCopy option; instead always use that code path. Also, enable throttling code to avoid errors on OSX, see substack/node-browserify#431 etc. Refs #18707. — committed to dojo/util by wkeese 9 years ago
As a work around I have upped the file limit for my user by adding this to
~/.bash_profile