我安装了ExtReact,并给出了示例。当我跑的时候
npm start我收到一个错误:
ERROR in [@extjs/reactor-webpack-plugin]: Error:
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: User limit of inotify watches
reached
[ERR]
[ERR] Total time: 13 seconds
[ERR] /home/user/project/build/ext-react/build.xml:101:
com.sencha.exceptions.BasicException: User limit of inotify watches reached
[ERR] A log is available in the file "/home/user/project/build/ext-
react/sencha-error-20171027.log"如何修复此错误?
发布于 2018-10-31 07:14:58
为什么?
同步文件(如dropbox、git等)的程序使用inotify来注意文件系统的更改。限制可以从以下几个方面看出-
cat /proc/sys/fs/inotify/max_user_watches对我来说,它显示了100000。如果此限制不足以监视目录中的所有文件,则会引发此错误。
增加inotify观察者的数量(短版本):
如果您正在运行Debian、RedHat或其他类似的Linux发行版,请在终端中运行以下命令:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p如果您正在运行ArchLinux,则运行以下命令(请参见此处了解原因):
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system然后将其粘贴到您的终端中,然后按enter以运行它。
技术细节:
侦听默认情况下在Linux上使用inotify来监视目录中的更改。遇到系统限制您可以监视的文件数量的情况并不少见。例如,Ubuntu的(64位) inotify限制设置为8192。
通过执行以下命令,您可以获得当前inotify文件的监视限制:
$ cat /proc/sys/fs/inotify/max_user_watches如果此限制不足以监视目录中的所有文件,则必须增加该限制以使侦听正常工作。
可以通过以下方式设置新的临时限制:
$ sudo sysctl fs.inotify.max_user_watches=524288
$ sudo sysctl -p如果您想使您的限制永久化,请使用:
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -p如果您一直抱怨,您可能还需要注意max_queued_events和max_user_instances的值。
来源:https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
发布于 2017-11-03 11:26:40
我通过编辑/etc/sysctl.conf来解决这个问题。在我添加的文件中
fs.inotify.max_user_watches=100000发布于 2019-11-13 06:12:33
增加表
cat /proc/sys/fs/inotify/max_user_watchessudo vim /etc/sysctl.confsudo sysctl -pecho fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p否则访问https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
https://stackoverflow.com/questions/47075661
复制相似问题