arloliu / copy-node-modules

Fast deploy Node.js modules from local source folder to distination folder
26 stars 14 forks source link

Error: EMFILE, too many files open #9

Closed ezze closed 6 years ago

ezze commented 6 years ago

I encountered the following error using this module:

Error: EMFILE: too many open files, open '/var/data/store/nfsshare/soft/copy-node-modules-emfile/node_modules/spdx-exceptions/README.md',Error: EMFILE: too many open files, open '/var/data/store/nfsshare/soft/copy-node-modules-emfile/dist/node_modules/spdx-exceptions/README.md',Error: EMFILE: too many open files, open '/var/data/store/nfsshare/soft/copy-node-modules-emfile/node_modules/spdx-exceptions/index.json'

While everything works fine on Ubuntu 16.04 LTS on my local machine, I get the error on CentOS 7 on the server.

Here is a related question on StackOverflow. I tried to use graceful-fs instead of fs as it proposed there but it doesn't work.

I created a repo reproducing this issue.

ezze commented 6 years ago

Please, consider merging #10 to solve the issue.

arloliu commented 6 years ago

Thanks a lot

ezze commented 6 years ago

@arloliu, thanks for accepting it. Will you publish a new version to npm with the changes?