首页 > 解决方案 > 通知最大文件限制

问题描述

我在 docker 环境中用电子编程反应应用程序。当我尝试时npm run dev,出现以下错误:

Error from chokidar (/home/app/mountpoint/Matres-GUI/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/runtime): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/app/mountpoint/Matres-GUI/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/runtime'

但我无法增加 inotify 观察者的数量,因为我没有编辑权限/etc/sysctl.conf

有没有办法放弃所有的观察者设置?

标签: reactjselectronredhatinotify

解决方案


终于在这里找到了解决方案

只需添加CHOKIDAR_USEPOLLING=true npm start到本地.env文件


推荐阅读