Skip to content

Instantly share code, notes, and snippets.

@gaspanik
Created July 13, 2013 20:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaspanik/5992152 to your computer and use it in GitHub Desktop.
Save gaspanik/5992152 to your computer and use it in GitHub Desktop.
npm: npm update "EMFILE" error fix.

OS X npm update "EMFILE" error fix.

OS Xで「npm update -g」とかすると、"EMFILE〜"のエラーが出る時の対処方法。

Check open files number.

$ ulimit -a

core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 256
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 709
virtual memory (kbytes, -v) unlimited

Set 'open files' to 4096

$ ulimit -n 4096

Check again.

$ ulimit -a

core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 709
virtual memory (kbytes, -v) unlimited


EMFILE installing a package · Issue #3259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment