React native start 报错
Scanning 561 folders for symlinks in /home/kevin/Projects/Firefly/node_modules (3ms)
┌────────────────────────────────────────────────────────────────────────────┐
│ Running packager on port 8081. │
│ │
│ Keep this packager running while developing on any JS projects. Feel │
│ free to close this tab and run your own packager instance if you │
│ prefer. │
│ │
│ https://github.com/facebook/react-native │
│ │
└────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
/home/kevin/Projects/Firefly
Loading dependency graph...
React packager ready.
ERROR watch /home/kevin/Projects/Firefly/node_modules/react-native/ReactAndroid/src/main/libraries/fbcore/src/main/java/com/facebook/common/logging ENOSPC
{"code":"ENOSPC","errno":"ENOSPC","syscall":"watch /home/kevin/Projects/Firefly/node_modules/react-native/ReactAndroid/src/main/libraries/fbcore/src/main/java/com/facebook/common/logging","filename":"/home/kevin/Projects/Firefly/node_modules/react-native/ReactAndroid/src/main/libraries/fbcore/src/main/java/com/facebook/common/logging"}
Error: watch /home/kevin/Projects/Firefly/node_modules/react-native/ReactAndroid/src/main/libraries/fbcore/src/main/java/com/facebook/common/logging ENOSPC
at exports._errnoException (util.js:1023:11)
at FSWatcher.start (fs.js:1306:19)
at Object.fs.watch (fs.js:1331:11)
at NodeWatcher.watchdir (/home/kevin/Projects/Firefly/node_modules/sane/src/node_watcher.js:144:20)
at Walker.<anonymous> (/home/kevin/Projects/Firefly/node_modules/sane/src/node_watcher.js:353:12)
at emitTwo (events.js:106:13)
at Walker.emit (events.js:192:7)
at /home/kevin/Projects/Firefly/node_modules/walker/lib/walker.js:69:16
at go$readdir$cb (/home/kevin/Projects/Firefly/node_modules/graceful-fs/graceful-fs.js:149:14)
at FSReqWrap.oncomplete (fs.js:112:15)
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
watchman 监控的文件数超过了最大的设置数,将数值调大:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论