{"id":741,"hash":"695a88c4c69a89c304c16ebec27920b0c2d188e22358f8433e4567eb29d36084","pattern":"React Native Error: ENOSPC: System limit for number of file watchers reached","full_message":"I have setup a new blank react native app.\n\nAfter installing few node modules  I got this error.\n\nRunning application on PGN518.\ninternal/fs/watchers.js:173\n   throw error;\n   ^\n\nError: ENOSPC: System limit for number of file watchers reached, watch '/home/badis/Desktop/react-native/albums/node_modules/.staging'\n   at FSWatcher.start (internal/fs/watchers.js:165:26)\n   at Object.watch (fs.js:1253:11)\n   at NodeWatcher.watchdir (/home/badis/Desktop/react-native/albums/node modules/sane/src/node watcher. js:175:20)\n   at NodeWatcher.<anonymous> (/home/badis/Desktop/react-native/albums/node modules/sane/src/node watcher. js:310:16)\n   at /home/badis/Desktop/react-native/albums/node modules/graceful-fs/polyfills.js:285:20\n   at FSReqWrap.oncomplete (fs.js:154:5)\n\nI know it's related to no enough space for watchman to watch for all file changes.\n\nI want to know what's the best course of action to take here ?\n\nShould I ignore node_modules folder by adding it to .watchmanconfig ?","ecosystem":"npm","package_name":"react-native","package_version":null,"solution":"Linux uses the inotify package to observe filesystem events, individual files or directories.\n\nSince React / Angular hot-reloads and recompiles files on save it needs to keep track of all project's files. Increasing the inotify watch limit should hide the warning messages.\n\nYou could try editing\n\n# insert the new value into the system config\necho fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p\n\n# check that the new value was applied\ncat /proc/sys/fs/inotify/max_user_watches\n\n# config variable name (not runnable)\nfs.inotify.max_user_watches=524288\n\nReal problem\nHowever, adding more watches is putting the cart in front of the horse. To learn more about the real solution.\n\nRead this answer:\nhttps://stackoverflow.com/a/70436159/6513173\n\nOr read the WebPack docs:\nhttps://webpack.js.org/configuration/watch/#watchoptionsignored","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/55763428/react-native-error-enospc-system-limit-for-number-of-file-watchers-reached","votes":654,"created_at":"2026-04-19T04:51:34.616302+00:00","updated_at":"2026-04-19T04:51:34.616302+00:00"}