Question

I know sometimes you can get the "Too many open files" error by updating or installing big npm packages but right now it is happening to me anytime 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'm on a Mac OS X 10.8 Mountain Lion and my ulimit is already set to unlimited

any suggestion?

Was it helpful?

Solution

Assuming that you are using MacOSX, try to find out what is your limit 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 that, try to edit/create a /etc/launchd.conf with something like:
limit maxfiles 256 unlimited
** Increase 256 to a higher number if that does not helps. Remember to reboot.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top