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?

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top