react-native start 报错 求大神解决啊! 跪拜了



  • ERROR watch /home/lihengjia/react-native/MyApplication/node_modules/react-native/node_modules/yeoman-generator/node_modules/rimraf/node_modules/glob/node_modules ENOSPC
    {"code":"ENOSPC","errno":"ENOSPC","syscall":"watch /home/lihengjia/react-native/MyApplication/node_modules/react-native/node_modules/yeoman-generator/node_modules/rimraf/node_modules/glob/node_modules","filename":"/home/lihengjia/react-native/MyApplication/node_modules/react-native/node_modules/yeoman-generator/node_modules/rimraf/node_modules/glob/node_modules"}
    Error: watch /home/lihengjia/react-native/MyApplication/node_modules/react-native/node_modules/yeoman-generator/node_modules/rimraf/node_modules/glob/node_modules ENOSPC
    at exports._errnoException (util.js:907:11)
    at FSWatcher.start (fs.js:1234:19)
    at Object.fs.watch (fs.js:1262:11)
    at NodeWatcher.watchdir (/home/lihengjia/react-native/MyApplication/node_modules/react-native/node_modules/sane/src/node_watcher.js:144:20)
    at Walker.<anonymous> (/home/lihengjia/react-native/MyApplication/node_modules/react-native/node_modules/sane/src/node_watcher.js:353:12)
    at emitTwo (events.js:87:13)
    at Walker.emit (events.js:172:7)
    at /home/lihengjia/react-native/MyApplication/node_modules/react-native/node_modules/sane/node_modules/walker/lib/walker.js:69:16
    at go$readdir$cb (/home/lihengjia/react-native/MyApplication/node_modules/react-native/node_modules/graceful-fs/graceful-fs.js:149:14)
    at go$readdir$cb (/home/lihengjia/react-native/MyApplication/node_modules/react-native/node_modules/graceful-fs/graceful-fs.js:149:14)



  • 我也遇到这个问题,是0基础学习React Native 的小白。基本没看到这个问题的解决方案。
    后来google,似乎跟linux boot 空间不足有关,正好,我系统也提示boot空间不足,所以我将用不到的内核都删掉后,就没有这个问题了。特地回复一下,好让其他遇到这个问题的人,能有个解决思路。

    查看安装的内核

    dpkg --get-selections |grep linux-image
    也可直接查看/boot下有哪些文件

    ls /boot
    查看当前运行内核

    uname -a
    将旧的内核删除(尽量保留2-3个以便恢复)

    sudo apt-get purge linux-image-3.5.0-17-generic
    清理/usr/src 文件

    sudo apt-get purge linux-headers-3.13.0-24


Log in to reply