我升级了expo,并使用了react-native-star-rating,我得到了:
ERROR TypeError: undefined is not an object (evaluating '_reactNative.Text.propTypes.allowFontScaling')
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
我看到了一些关于这个补丁的东西,但我不知道我是如何做到的
1条答案
按热度按时间fcwjkofz1#
只需转到node_modules/React Native按钮/按钮. js
并从'deprecated-react-native-prop-types'汇入{文字属性类型}
将“静态属性类型”更改为
静态属性类型= {...允许字体缩放:文本属性类型.允许字体缩放,...样式:TextPropTypes.style样式已禁用:文本属性类型. style,...};
显然,你必须先安装npm deprecated-react-native-prop-types,然后再做上面提到的事情。