1 No bundle url present
- 检查是否开始全局代理,并关闭
- 接着出现2
2 Cannot find entry file index.ios.js in any of the roots...
npm start --reset-cache
3 TouchableNativeFeedback is not supported on this platform
我是在ios虚拟机上测试的,官网中
A wrapper for making views respond properly to touches (Android only)。查看
4 Route xx should declare a screen
检查引用的组件是否正确,顺序错误也会导致这样的报错
5 Unrecognized font family 'Material Icons'
// 引用方式
import Icons from 'react-native-vector-icons/MaterialIcons'
// 将'MaterialIcons'改换成'FontAwesome',仍然报相似错误,重新执行 `react-native run-ios `错误消失
6 Could not find "store" in either the context or props of "Connect(Contacts)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(Contacts)"
7 isImmutable is not a function
8 Missing class properties transform
需安装特定版本 4.0.0-rc.2
9 in this enviroment the sources for assign MUST be an object. This error is a
performance optimization and not spec compliant
检查,一般是属性的地方应该需要转换为js,便于后续 Object.assign() 操作
10 Uncaught TypeError:babelHelpers.typeof is not a function
试了很多种办法,最后只有这个方法帮助了我,文本框不能输入的问题也奇迹般解决了,
ref
"clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean"
11 react native 中文输入法
需要引入插件