详细怎么晋级

react-native-community.github.io/upgrade-hel… 能够通过拜访这个官方网站, 比较哪些文件和语句需求改动, 建议一点点晋级, 每次遇到问题独自处理, 再晋级更高的版别

怎么运用 Xcode检查 失利的log

1.需求切换到最后一个菜单, 然后能够看到失利的log, 点击检查详细信息

React-Native晋级之爬坑总结
React-Native晋级之爬坑总结

比方这个错误就能够发现是ios的版别设置的不对, 显现是11.0. 需求配置到12.4以上

React-Native晋级之爬坑总结

切换到12.4就能够通过, 这是web开发者不明白的, Xcode请教了ios开发的同事才知道, 小本本记录下

React-Native晋级之爬坑总结

运用grep命令找到详细引入方法的包

 ERROR  Invariant Violation: ART has been removed from React Native. It can now be installed and imported from '@react-native-community/art' instead of 'react-native'. See https://github.com/react-native-art/art
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

遇到了这样一个问题, 可是搜索整个开发目录并没有直接运用ART的语法, 所以需求考虑是不是依赖包用了, 可是一个个查找必定不可, 所以发现能够用grep这个命令找到

grep "import.*ART.*react-native" ./node_modules/ -Rn -l grep 查找的字符串或许正则表达式 查找目录

bin.zmide.com/?p=677

遇到依赖包的typescript比自己用的高, 导致不能编译

榜首看看包用的多不多, 假如不多, 能够暂时用require来替代import, 暂时越过typescript的检查, 之后, 晋级typescript再详细晋级 假如晋级的包很多, 那么能够revert还原到之前的版别, 之后再晋级, 假如typescript晋级很简单, 那么能够晋级typescript

持续补充….