0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

yarn install で出会った「error An unexpected error occurred: "ENFILE: file table overflow」を解決したよ

Last updated at Posted at 2021-04-08

事象

yarn installしていたら、以下のエラーに出会った。

error An unexpected error occurred: "ENFILE: file table overflow ...

環境

Mac OS 11.2.3 (Big sur)
node v14.16.1

対処方法

nodeがどうとかyarnがどうとかでなく、Macの制限が原因みたい。
で、以下のコマンド実行

$ echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf                             
Password:
kern.maxfiles=65536

$ echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
kern.maxfilesperproc=65536

$ sudo sysctl -w kern.maxfiles=65536      
kern.maxfiles: 12288 -> 65536

$ sudo sysctl -w kern.maxfilesperproc=65536
kern.maxfilesperproc: 10240 -> 65536

$ ulimit -n 65536

その後、無事にyarn install完了!!!
よかった!!

参考サイト

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?