当我跑react-native start的时候,我得到以下信息

Error: A non-recoverable condition has triggered. Watchman needs your help! The triggering condition was at timestamp=1489123194: inotify-add-watch(/var/www/html/eventManager/android/app/src/main/res/mipmap-mdpi) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl All requests will continue to fail with this message until you resolve the underlying problem. You will find more information on fixing this at https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch

at ChildProcess.<anonymous> (/var/www/html/bookLister/node_modules/fb-watchman/index.js:207:21)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12)

推荐答案

echo 256 | sudo tee -a /proc/sys/fs/inotify/max_user_instances
echo 32768 | sudo tee -a /proc/sys/fs/inotify/max_queued_events
echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches

watchman关闭服务器

这个有帮助

React-native相关问答推荐

react 本机函数不通过usContext触发

无法解析 com.google.gms:google-services:4.3.15

React Native 无法下载模板

元素类型无效:应为字符串

我们应该在 react-native 移动应用程序中使用哪个图标库

reactnavigation后退按钮的自定义后退导航

在 React Native Paper 中更改 TextInput 的文本 colored颜色

如何在 React Native 中测量我的应用程序的数据使用情况?

React Native 转换与枢轴点

给定 APK 文件,我如何检测应用程序是否使用 React Native?

你如何使 react-native react-navigation 标签栏透明

如何在 React Native 中模拟align-items:baseline?

元素中缺少main.jsbundle、Foundation和Security,导致报错

react native图像不适用于特定 URL

React native - 创建单例模式的最佳方式

React Native 中的原生广告

我可以将标题传递给图像源吗?

如何修复 npm start cannot determine native SDK version错误?

设置 react-native 元素时使用特定的包名称

react-native-webview :对于 iOS 文本太小