0Day Forums
React Native Error: ENOSPC: System limit for number of file watchers reached - Printable Version

+- 0Day Forums (https://zeroday.vip)
+-- Forum: Coding (https://zeroday.vip/Forum-Coding)
+--- Forum: React Native (https://zeroday.vip/Forum-React-Native)
+--- Thread: React Native Error: ENOSPC: System limit for number of file watchers reached (/Thread-React-Native-Error-ENOSPC-System-limit-for-number-of-file-watchers-reached)



React Native Error: ENOSPC: System limit for number of file watchers reached - languisher14091 - 07-19-2023

I have setup a new blank react native app.

After installing few node modules I got this error.

```
Running application on PGN518.
internal/fs/watchers.js:173
throw error;
^

Error: ENOSPC: System limit for number of file watchers reached, watch '/home/badis/Desktop/react-native/albums/node_modules/.staging'
at FSWatcher.start (internal/fs/watchers.js:165:26)
at Object.watch (fs.js:1253:11)
at NodeWatcher.watchdir (/home/badis/Desktop/react-native/albums/node modules/sane/src/node watcher. js:175:20)
at NodeWatcher.<anonymous> (/home/badis/Desktop/react-native/albums/node modules/sane/src/node watcher. js:310:16)
at /home/badis/Desktop/react-native/albums/node modules/graceful-fs/polyfills.js:285:20
at FSReqWrap.oncomplete (fs.js:154:5)
```

I know it's related to no enough space for watchman to watch for all file changes.

I want to know what's the best course of action to take here ?

Should I ignore `node_modules` folder by adding it to `.watchmanconfig` ?