码迷,mamicode.com
首页 > 其他好文 > 详细

React Native 基础报错及解决方案记录

时间:2018-10-08 19:29:57      阅读:222      评论:0      收藏:0      [点我收藏+]

标签:app   code   rar   reac   eset   启动   tar   sele   can   

刚开始上手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

持续踩坑,持续更新

React Native 基础报错及解决方案记录

标签:app   code   rar   reac   eset   启动   tar   sele   can   

原文地址:https://www.cnblogs.com/heioray/p/9756090.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!