gpt4 book ai didi

react-native - 无法解析模块 react-native/Libraries/Components/View/ViewStylePropTypes

转载 作者:行者123 更新时间:2023-12-03 14:29:52 24 4
gpt4 key购买 nike

这是我的 package.json:

{
"name": "BStore",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"expo": "^32.0.5",
"native-base": "^2.11.0",
"prop-types": "^15.7.2",
"react": "16.6.3",
"react-native": "0.58.3",
"react-native-gesture-handler": "^1.0.15",
"react-native-paper": "^2.11.0",
"react-navigation": "^3.0.9",
"react-navigation-material-bottom-tabs": "^1.0.0"
},
"devDependencies": {
"babel-core": "7.0.0-bridge.0",
"babel-jest": "24.1.0",
"jest": "24.1.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}

我收到此错误 Unable to resolve module react-native/Libraries/Components/View/ViewStylePropTypes`

任何想法我该如何解决这个问题?

最佳答案

您必须 仔细阅读错误信息 .我有同样的问题,我的是:

Unable to resolve module react-native/Libraries/Components/View/ViewStylePropTypes from /APP/node_modules/react-native-render-html/src/HTMLUtils.js: Module react-native/Libraries/Components/View/ViewStylePropTypes does not exist in the Haste module map



所以第三方图书馆 react-native-render-html导致错误,因为它尝试使用 ViewStylePropTypes。

如果是 @adrian-moisa : 对你来说是 react-native-reanimated .
不知道 ThreadOpener 的原因是什么,他没有发布可用的错误消息。

事实是, ViewStylePropTypes已从 react-native 0.58 中删除

比较:
https://github.com/facebook/react-native/tree/v0.57.8/Libraries/Components/View
https://github.com/facebook/react-native/tree/v0.58.0/Libraries/Components/View

因此解决方案是找出导致错误的 3rd-Party 组件,并查看是否有维护者的升级,或者自己必须修补它(例如使用 patch-package )

关于react-native - 无法解析模块 react-native/Libraries/Components/View/ViewStylePropTypes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54695045/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com