Reputation: 61
I am having trouble figuring out the cause of the issue.
I start the server with npm start
I deploy the code and reverse the adb to a physical device with react-native run-android
.
i get the following error on the server . What is the possible fix ? Any solution is highly appreciated
ERROR watch /home/pichate/projects/react/ReactNative/ReactNative/NF/node_modules/react-native/node_modules/fbjs-scripts/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify ENOSPC
{"code":"ENOSPC","errno":"ENOSPC","syscall":"watch /home/pichate/projects/react/ReactNative/ReactNative/NF/node_modules/react-native/node_modules/fbjs-scripts/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify","filename":"/home/pichate/projects/react/ReactNative/ReactNative/NF/node_modules/react-native/node_modules/fbjs-scripts/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify"}
Error: watch /home/pichate/projects/react/ReactNative/ReactNative/NF/node_modules/react-native/node_modules/fbjs-scripts/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify ENOSPC
at exports._errnoException (util.js:870:11)
at FSWatcher.start (fs.js:1234:19)
at Object.fs.watch (fs.js:1262:11)
at NodeWatcher.watchdir (/home/pichate/projects/react/ReactNative/ReactNative/NF/node_modules/react-native/node_modules/sane/src/node_watcher.js:144:20)
at Walker.<anonymous> (/home/pichate/projects/react/ReactNative/ReactNative/NF/node_modules/react-native/node_modules/sane/src/node_watcher.js:353:12)
at emitTwo (events.js:87:13)
at Walker.emit (events.js:172:7)
at /home/pichate/projects/react/ReactNative/ReactNative/NF/node_modules/react-native/node_modules/sane/node_modules/walker/lib/walker.js:69:16
at /home/pichate/projects/react/ReactNative/ReactNative/NF/node_modules/react-native/node_modules/graceful-fs/graceful-fs.js:142:16
at /home/pichate/projects/react/ReactNative/ReactNative/NF/node_modules/react-native/node_modules/graceful-fs/graceful-fs.js:142:16
Upvotes: 3
Views: 3657
Reputation: 429
This may be the problem with watchman. It has watched too many files. If it is, cancel the limit Without using watchman, this can be fixed by the below command. In terminal run the command:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Upvotes: 9
Reputation: 339
I faced the same problem, It worked after restarting my computer, I suggest you try to restart
Upvotes: -1