react yarn watch报错 Error: ENOSPC: System limit for number of file watchers reached

react yarn watch报错 Error: ENOSPC: System limit for number of file watchers reached

解决办法:

# cat /proc/sys/fs/inotify/max_user_watches

8192

# vi /etc/sysctl.conf

添加:

fs.inotify.max_user_watches=524288

之后启用该配置:

# sudo sysctl -p

再查看:

# cat /proc/sys/fs/inotify/max_user_watches

524288

最后再运行yarn watch就不报错了

相关文章