React native start 报错

发布于 2023-12-10 18:42:04 字数 2574 浏览 28 评论 0

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

关于作者

嗼ふ静

暂无简介

文章
评论
26 人气
更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文