android - UnhandledPromiseRejectionWarning : Error: ENOSPC: no space left on device, watch <项目目录>

标签 android react-native node-modules

我已经创建了新的 React Native 项目并尝试在 android 模拟器上运行它,但是当我编写commane react-native start 时,它显示以下错误。

Loading dependency graph...(node:9088) UnhandledPromiseRejectionWarning: Error: ENOSPC: no space left on device, watch '<project path>'
at FSWatcher.start (internal/fs/watchers.js:161:26)
at Object.watch (fs.js:1218:11)
at NodeWatcher.watchdir (<project path>/node_modules/sane/src/node_watcher.js:175:20)
at new NodeWatcher (<project path>/node_modules/sane/src/node_watcher.js:45:8)
at createWatcher (<project path>/node_modules/jest-haste-map/build/index.js:762:23)
at Array.map (<anonymous>)
at HasteMap._watch (<project path>/node_modules/jest-haste-map/build/index.js:912:44)

谁能帮我解决这个问题?我用相同的设置创建了 2 个项目,一个工作正常,但另一个出现这种错误。

react: 16.4.1
react-native:0.56.0
OS:ubuntu 16.04

最佳答案

To solve ENOSPC issue run following commands on Ubuntu

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

sysctl --system

For Arch Linux update below line in /etc/sysctl.d/99-sysctl.conf file

fs.inotify.max_user_watches=524288

After this run

sysctl --system

关于android - UnhandledPromiseRejectionWarning : Error: ENOSPC: no space left on device, watch <项目目录>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51998691/

相关文章:

node.js 要求结果未定义

java - slider 在表格中始终具有默认宽度

android - xml解析中如何解析属性中的值

react-native - React Native AsyncStorage 在渲染后获取数据

react-native - 输入失去对开始输入主题的关注

node.js - 意外 token {../node_modules/fs-extra/lib/mkdirs/make-dir.js :85 } catch { || brazil-build

reactjs - 处理未定义声明文件的正确方法 (index.d.ts)

java - 遵循 osmbonuspack "Hello, Routing World!"教程时出错

android - Fragment 中的 ViewPager 在 transaction.remove() 之后消失(维护实例?)

javascript - 错误边界应该实现 getDerivedStateFromError()