如本文对您有帮助,就请我喝杯奶茶吧!
- 支付宝打赏
微信打赏
扫描用手机阅读此文
支持Android/iPhone
新版本存在不兼容,在运行 react-native run-android
发生的错误
$ react-native -v
:
react-native-cli: 2.0.1
react-native: 0.47.1
$node -v
: v8.3.0
$ npm -v
: v5.6.0
babel-preset-react-native version : @3.0.0 存在问题,需要版本回退
方法1:使用 yarn 工具
$ yarn remove babel-preset-react-native
$ yarn add babel-preset-react-native@2.1.0
方法2:使用 npm 工具
$ npm uninstall --save-dev babel-preset-react-native
$ npm install babel-preset-react-native@2.1
本文到此就要告一段落了,如果对你有帮助,能否打赏请我喝杯奶茶呢~ 感谢你的阅读。
关注微信公众号「木小夭设计」,回复关键字“666”,免费领取IT必读98本经典电子书大礼包,