Npm -g "anything" too many open files

I sometimes know that you can get the "Too many open files" error by updating or installing large npm packages, but right now this happens to me anytime when I try to do something with "-g"

npm -g ls npm ls -g npm update -g 

even specifically

 npm update -g grunt-cli npm update -g [whatever package] npm install -g [whatever package] 

I am on Mac OS X 10.8 Mountain Lion and my ulimit is already installed on unlimited

any suggestion?

+6
source share
1 answer

Assuming you are using MacOSX, try to figure out what your limit is by doing:
launchctl limit maxfiles

I have a clean install of OSX Maverick and I have:
maxfiles 256 unlimited

If your system does not show this, try editing / creating /etc/launchd.conf with something like:
limit maxfiles 256 unlimited
** Increase 256 to a larger number if this does not help. Do not forget to reboot.

Check this answer: https://unix.stackexchange.com/questions/108174/how-to-persist-ulimit-settings-in-osx-mavericks

+1
source

All Articles