react-native run-android失败错误监视

时间:2016-07-18 09:04:05

标签: reactjs react-native

我无法找出问题的原因。

我使用npm start启动服务器 我部署代码并将adb反向到react-native run-android的物理设备。

我在服务器上收到以下错误。有什么可能的解决办法?任何解决方案都非常受欢迎

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

1 个答案:

答案 0 :(得分:2)

这可能是守望者的问题。它看了太多文件。如果是,取消限制不使用看门人,可以通过以下命令修复。在终端运行命令:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

希望这会对你有所帮助。