HarmonyOS项目里引入RN三方库react-native-webview报错
报错如下:
1 ERROR: ArkTS:ERROR File: /Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@react-native-oh-tpl+react-native-webview@omx0kqwv+tyoms+7rlqzyhbjnzd1vaglwsjtr6+bgyo=/oh_modules/@react-native-oh-tpl/react-native-webview/src/main/ets/RNCWebViewPackage.ts:35:12
Property 'RNCWebView' does not exist on type 'typeof import("/Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@rnoh+react-native-openharmony@b5r9+r64bsxgq3hdxnuvlfsm0jdsawyjurzfp74aw+u=/oh_modules/@rnoh/react-native-openharmony/generated/components/ts")'.
2 ERROR: ArkTS:ERROR File: /Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@react-native-oh-tpl+react-native-webview@omx0kqwv+tyoms+7rlqzyhbjnzd1vaglwsjtr6+bgyo=/oh_modules/@react-native-oh-tpl/react-native-webview/src/main/ets/RNCWebViewPackage.ts:35:47
Property 'RNCWebView' does not exist on type 'typeof import("/Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@rnoh+react-native-openharmony@b5r9+r64bsxgq3hdxnuvlfsm0jdsawyjurzfp74aw+u=/oh_modules/@rnoh/react-native-openharmony/generated/components/ts")'.
3 ERROR: ArkTS:ERROR File: /Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@react-native-oh-tpl+react-native-webview@omx0kqwv+tyoms+7rlqzyhbjnzd1vaglwsjtr6+bgyo=/oh_modules/@react-native-oh-tpl/react-native-webview/src/main/ets/WebViewBaseOperate.ets:29:29
Namespace '"/Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@rnoh+react-native-openharmony@b5r9+r64bsxgq3hdxnuvlfsm0jdsawyjurzfp74aw+u=/oh_modules/@rnoh/react-native-openharmony/generated/components/ts"' has no exported member 'RNCWebView'.
4 ERROR: ArkTS:ERROR File: /Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@react-native-oh-tpl+react-native-webview@omx0kqwv+tyoms+7rlqzyhbjnzd1vaglwsjtr6+bgyo=/oh_modules/@react-native-oh-tpl/react-native-webview/src/main/ets/WebViewBaseOperate.ets:32:33
Namespace '"/Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@rnoh+react-native-openharmony@b5r9+r64bsxgq3hdxnuvlfsm0jdsawyjurzfp74aw+u=/oh_modules/@rnoh/react-native-openharmony/generated/components/ts"' has no exported member 'RNCWebView'.
5 ERROR: ArkTS:ERROR File: /Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@react-native-oh-tpl+react-native-webview@omx0kqwv+tyoms+7rlqzyhbjnzd1vaglwsjtr6+bgyo=/oh_modules/@react-native-oh-tpl/react-native-webview/src/main/ets/RNCWebView.ets:50:37
Property 'RNCWebView' does not exist on type 'typeof import("/Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@rnoh+react-native-openharmony@b5r9+r64bsxgq3hdxnuvlfsm0jdsawyjurzfp74aw+u=/oh_modules/@rnoh/react-native-openharmony/generated/components/ts")'.
6 ERROR: ArkTS:ERROR File: /Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@react-native-oh-tpl+react-native-webview@omx0kqwv+tyoms+7rlqzyhbjnzd1vaglwsjtr6+bgyo=/oh_modules/@react-native-oh-tpl/react-native-webview/src/main/ets/RNCWebView.ets:85:29
Namespace '"/Users/xxx/Desktop/app/MyApplication/oh_modules/.ohpm/@rnoh+react-native-openharmony@b5r9+r64bsxgq3hdxnuvlfsm0jds
HarmonyOS
赞
收藏 0
回答 1
待解决
相关问题
HarmonyOS RN三方库react-native-picker支持情况
222浏览 • 1回复 待解决
HarmonyOS RN三方库react-native-reanimated编译错误
288浏览 • 1回复 待解决
HarmonyOS rn三方库react-native-star-rating移植问题 -
225浏览 • 1回复 待解决
HarmonyOS RN三方库@react-native-community/cameraroll支持情况
210浏览 • 1回复 待解决
HarmonyOS RN三方库react-native-spring-scrollview支持情况
173浏览 • 1回复 待解决
【RN三方库】【文档】react-native-skia库使用文档错误
0浏览 • 0回复 待解决
HarmonyOS RN-原生引入RN三方库编译异常
338浏览 • 1回复 待解决
HarmonyOS react-native-pdf三方库问题
152浏览 • 1回复 待解决
HarmonyOS React Native三方库需要适配@react-native-community/art
220浏览 • 1回复 待解决
HarmonyOS 引入react-native-mjrefresh三方库,发现头文件不存在
501浏览 • 1回复 待解决
RN三方库react-navigation/elements 是否适配HarmonyOS
1575浏览 • 1回复 待解决
HarmonyOS react-native-webview 13.10.2-nc.0.0.1 编译报错
354浏览 • 1回复 待解决
HarmonyOS RN react-native-skia三方库编译通过,但是设备上RN界面快速闪退
248浏览 • 1回复 待解决
HarmonyOS react-native-webview闪退问题
140浏览 • 1回复 待解决
react-native 第三方库使用npm更新
1548浏览 • 1回复 待解决
HarmonyOS react-native-safe-area-context等React Native第三方库的支持
103浏览 • 1回复 待解决
HarmonyOS RN三方组件picker组件无法正确引入
131浏览 • 1回复 待解决
HarmonyOS react-native-scrollable-tab-view三方库是否已支持?
290浏览 • 1回复 待解决
HarmonyOS react-native-swiper轮播图三方库是否已支持?
329浏览 • 1回复 待解决
HarmonyOS rn三方库集成官网
682浏览 • 1回复 待解决
HarmonyOS RN三方库的适配情况
713浏览 • 1回复 待解决
HarmonyOS RN三方库适配方案
1浏览 • 0回复 待解决
HarmonyOS react-native-webview 加载网页失败,渲染白屏
0浏览 • 0回复 待解决
参考引入文档:https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-webview.md#https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2Freact-native-oh-library%2Freact-native-webview%2Freleases
generated文件为codegen生成代码,请在rn项目的package.json文件配置codegen,在工程根目录下执行ohpm run dev后重试。