在使用最新版 react-native 0.69.3 版本报错(window - 安卓环境)

来源:5-9 基于react-navigation的APP导航框架搭建-顶部导航-

屈文敏

2022-08-03

react-native-navbar-plus 插件在react-native 0.69.3中引入后报错

ERROR Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from ‘deprecated-react-native-prop-types’.
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.
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.

网上搜索看了好像是:
Same issue here after upgrading to 0.69, there are a lot of external libraries still using ViewPropTypes. Perhaps an unpopular opinion, but maybe it’s too early to deprecate ViewPropTypes completely?

不知道是不是这个问题, 我不用这个插件就可以正常渲染

写回答

1回答

CrazyCodeBoy

2022-08-04

新版本react-native-safe-area-plus与react-native-navbar-plus已解决该问题,将它们升级到2.6.1版本即可。

如果有淘宝景象需要关闭。

0
5
懵逼猫
如果npm下载显示 npm ERR! code ETARGET npm ERR! notarget No matching version found for react-native-navbar-plus@2.6.0. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist 查看下当前的npm镜像源是不是为npm原先的镜像源,不要用淘宝镜像源 npm config set registry https://registry.npmjs.org/
2022-10-24
共5条回复

RN入门到进阶,打造高质量上线App

解锁React Native开发应用新姿势,React Native新版本热门技术

3159 学习 · 3253 问题

查看课程