【发布时间】:2022-08-24 18:43:44
【问题描述】:
由于 ViewPropTypes 已从 \'react-native\' 中删除,并且使用它的包没有更新。构建应用程序后出现此错误
ERROR Invariant Violation: ViewPropTypes 已从 React Native 中删除。迁移到从 \'deprecated-react-native-prop-types\' 导出的 ViewPropTypes。
错误不变违规:模块 AppRegistry 不是已注册的可调用模块(调用 runApplication)。错误的常见原因是应用程序入口文件路径不正确。 当 JS 包损坏或加载 React Native 时出现早期初始化错误时,也会发生这种情况。 错误不变违规:模块 AppRegistry 不是已注册的可调用模块(调用 runApplication)。错误的常见原因是应用程序入口文件路径不正确。 当 JS 包损坏或加载 React Native 时出现早期初始化错误时,也会发生这种情况。我正在使用的软件包:
\"@react-native-clipboard/clipboard\": \"^1.10.0\", \"@react-native-community/checkbox\": \"^0.5.12\", \"@react-native-firebase/app\": \"^14.11.0\", \"@react-native-firebase/auth\": \"^14.9.4\", \"@react-native-firebase/database\": \"^14.11.0\", \"@react-native-firebase/firestore\": \"^14.11.0\", \"@react-native-google-signin/google-signin\": \"^7.2.2\", \"@react-native-masked-view/masked-view\": \"github:react-native-masked-view/masked-view\", \"@react-native-picker/picker\": \"^2.4.1\", \"@react-navigation/bottom-tabs\": \"^6.3.1\", \"@react-navigation/native\": \"^6.0.10\", \"@react-navigation/stack\": \"^6.2.1\", \"axios\": \"^0.27.2\", \"base-64\": \"^1.0.0\", \"num-words\": \"^1.2.2\", \"numeral\": \"^2.0.6\", \"pdf-lib\": \"^1.17.1\", \"react\": \"17.0.2\", \"react-native\": \"^0.69.0\", \"react-native-blob-util\": \"^0.16.1\", \"react-native-country-picker-modal\": \"^2.0.0\", \"react-native-date-picker\": \"^4.2.2\", \"react-native-fbsdk-next\": \"^8.0.5\", \"react-native-fs\": \"^2.20.0\", \"react-native-gesture-handler\": \"^2.5.0\", \"react-native-html-to-pdf\": \"^0.12.0\", \"react-native-pdf\": \"^6.5.0\", \"react-native-picker-select\": \"^8.0.4\", \"react-native-progress\": \"^5.0.0\", \"react-native-radio-input\": \"^0.9.4\", \"react-native-ratings\": \"^8.1.0\", \"react-native-safe-area-context\": \"^4.2.5\", \"react-native-screens\": \"^3.13.1\", \"react-native-share\": \"^7.5.0\", \"react-native-signature-canvas\": \"^4.3.1\", \"react-native-vector-icons\": \"^9.1.0\", \"react-native-webview\": \"^11.21.2\", \"react-scripts\": \"^5.0.1\"有什么解决办法吗?
-
您是否尝试过错误消息所说的内容?
Migrate to ViewPropTypes exported from \'deprecated-react-native-prop-types\'. -
因为当我这样做时,我会得到这个
TypeError: undefined is not an object (evaluating \'ReactCurrentActQueue$1.isBatchingLegacy\')
标签: react-native