I am programming react app with electron in a docker environment.
When I try to npm run dev
, I got the following error :
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'
But I can't increase the amount of inotify watchers because I have no root access to edit /etc/sysctl.conf
Is there a way to drop all the watchers set ?
Finally found a solution here
Just add CHOKIDAR_USEPOLLING=true npm start
to a local .env
file