zoukankan      html  css  js  c++  java
  • React Native 基础报错及解决方案记录

    刚开始上手RN,碰到很多坑,记录一下。碰到问题多去看看github上面的issue!


    启动命令react-native run-ios报错
    1、:xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

    解决方案

    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/
    

    重新跑一下就好了

    2、bundling failed: Error: Unable to resolve module './../react-transform-hmr/lib/index.js'

    解决方案

    react-native start --reset-cache
    

    3、Cannot read property 'bindings' of null

    node_modules/react-native/Libraries/react-native/react-native-implementation.js: Cannot read property 'bindings' of null (null))
    

    这个大致是babel包的版本问题,解决方案

    npm install babel-preset-react-native@5 --save
    

    4、_this._registerEvents is not a function. xxx
    这个报错具体原因不明,但是react-native的npm版本从0.57降到0.56之后就好了。。。就好了。。。莫名其妙的好了。。。

    持续踩坑,持续更新

  • 相关阅读:
    第一次作业(2)
    第0次作业(2)
    最后一次作业—总结报告
    第八次作业
    第七周作业
    第六周作业
    第四周作业
    第4次作业
    2018c语言第3次作业
    2018c语言第2次作业
  • 原文地址:https://www.cnblogs.com/heioray/p/9756090.html
Copyright © 2011-2022 走看看