我已经创建了新的 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/