运行时出错

yejia_alice React Native 快速... 最后由 newlcc 于2015年10月23日回复

  • 2 回答
  • 13.6k 浏览

[15:51:14] <START> fs crawl

TypeError: Cannot read property 'root' of null

    at /Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84

    at tryCallOne (/Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/lib/core.js:37:12)

    at /Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/lib/core.js:103:15

    at flush (/Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)

    at process._tickCallback (node.js:355:11)

[15:51:18] <START> request:/index.ios.bundle

[15:51:18] <START> find dependencies

TypeError: Cannot read property 'root' of null

    at /Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84

    at tryCallOne (/Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/lib/core.js:37:12)

    at /Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/lib/core.js:103:15

    at flush (/Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)

    at process._tickCallback (node.js:355:11)

TypeError: Cannot read property 'root' of null

    at /Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84

    at tryCallOne (/Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/lib/core.js:37:12)

    at /Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/lib/core.js:103:15

    at flush (/Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)

    at process._tickCallback (node.js:355:11)

TypeError: Cannot read property 'root' of null

    at /Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84

    at tryCallOne (/Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/lib/core.js:37:12)

    at /Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/lib/core.js:103:15

    at flush (/Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)

    at process._tickCallback (node.js:355:11)

TypeError: Cannot read property 'root' of null

    at /Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84

    at tryCallOne (/Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/lib/core.js:37:12)

    at /Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/lib/core.js:103:15

    at flush (/Users/yejia_alice/Desktop/react-native/Hello/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)

    at process._tickCallback (node.js:355:11)

[15:51:28] <START> request:/index.ios.bundle

[15:51:28] <START> request:/index.ios.bundle

[15:51:28] <START> request:/index.ios.bundle

[15:51:29] <START> request:/index.ios.bundle

  • newlcc 2015年10月23日 回答 #2楼
  • 1楼方法不对!!


    解决方法:

    打开终端,输入 

    brew update

    成功后再输入

    brew upgrade watchman

    关掉Xcode重新运行即可

    如果你这么就解决问题了就好了.. 我自己brew update的时候遇到这样的问题

    No such file or directory - /usr/local/Library/Formula/.brew.67541.1327099610

    解决方法:

    依次输入

    sudo chown -R $USER:admin /usr/local

    cd /usr/local

    git reset --hard origin/master

    brew update

    再brew upgrade watchman

    再次运行,应该可以了!

  • 1 评论