2018年1月17日 星期三

[Webpack] Limitation of number of files watch

When watching files with webpack, please make sure there are default limits on the number of files it can watch, (i.e.: 8192), if you want to watch more, please follow the below instructions

The current watch limit can be seen through the command
$ cat /proc/sys/fs/inotify/max_user_watches
In my case it was 8192 which is the default value for linux X64 systems
To change it temporarily we need to run the following commands
$ sudo sysctl fs.inotify.max_user_watches=524288
$ sudo sysctl -p
For permanently setting it we should run run
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -p

沒有留言:

張貼留言