HarmonyOS react-native-pager-view安装失败

https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-pager-view.md参考此链接,在vscode里面下载tgz包,然后把对应的har包直接复制到HarmonyOS项目libs目录下面,装的这个版本6.2.3-0.2.2,运行报错:

/Applications/DevEco-Studio.app/Contents/tools/ohpm/bin/ohpm install --registry https://ohpm.openharmony.cn/ohpm/ --strict_ssl true
ohpm ERROR: missing: @rnoh/react-native-openharmony@/Users/xxxx/DevecostudioProjects/ZRN-Harmony/oh_modules/.ohpm/@react-native-oh-tpl+react-native-pager-view@e9cjhtj4hvh75hojtobcga+ddfw=/oh_modules/@react-native-oh-tpl/react_native_openharmony, required by @react-native-oh-tpl/react-native-pager-view@/Users/xxxx/DevecostudioProjects/ZRN-Harmony/libs/pager_view.har
ohpm ERROR: missing: @rnoh/react-native-openharmony@/Users/xxxx/DevecostudioProjects/ZRN-Harmony/oh_modules/.ohpm/@react-native-oh-tpl+react-native-pager-view@e9cjhtj4hvh75hojtobcga+ddfw=/oh_modules/@react-native-oh-tpl/react_native_openharmony, required by @react-native-oh-tpl/react-native-pager-view@/Users/xxxxx/DevecostudioProjects/ZRN-Harmony/libs/pager_view.har
ohpm ERROR: Found exception: Error: Fetch local folder package error, /Users/xxxxx/DevecostudioProjects/ZRN-Harmony/oh_modules/.ohpm/@react-native-oh-tpl+react-native-pager-view@e9cjhtj4hvh75hojtobcga+ddfw=/oh_modules/@react-native-oh-tpl/react_native_openharmony does not exist., reached retry limit or non retryable error encountered.
ohpm ERROR: Found exception: Error: Fetch local folder package error, /Users/xxxxx/DevecostudioProjects/ZRN-Harmony/oh_modules/.ohpm/@react-native-oh-tpl+react-native-pager-view@e9cjhtj4hvh75hojtobcga+ddfw=/oh_modules/@react-native-oh-tpl/react_native_openharmony does not exist., reached retry limit or non retryable error encountered.
ohpm ERROR: ERUNNING execute tasks failed, Error: Fetch local folder package error, /Users/xxxxx/DevecostudioProjects/ZRN-Harmony/oh_modules/.ohpm/@react-native-oh-tpl+react-native-pager-view@e9cjhtj4hvh75hojtobcga+ddfw=/oh_modules/@react-native-oh-tpl/react_native_openharmony does not exist.
ohpm ERROR: ERUNNING execute tasks failed, Error: Fetch local folder package error, /Users/xxxxx/DevecostudioProjects/ZRN-Harmony/oh_modules/.ohpm/@react-native-oh-tpl+react-native-pager-view@e9cjhtj4hvh75hojtobcga+ddfw=/oh_modules/@react-native-oh-tpl/react_native_openharmony does not exist.
ohpm ERROR: Install failed, detail: Error: Fetch local folder package error, /Users/xxxxx/DevecostudioProjects/ZRN-Harmony/oh_modules/.ohpm/@react-native-oh-tpl+react-native-pager-view@e9cjhtj4hvh75hojtobcga+ddfw=/oh_modules/@react-native-oh-tpl/react_native_openharmony does not exist.

Process finished with exit code 1
HarmonyOS
1天前
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
Heiang

可将tgz下载到HarmonyOS工程当前目录下,打开 entry/oh-package.json5,添加依赖,参考https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-pager-view.md中引入原生端代码1后,进行ohpm install;注意前后路径问题。

分享
微博
QQ
微信
回复
1天前
相关问题
HarmonyOS react-native-view-shot使用
39浏览 • 1回复 待解决
HarmonyOS 适配 React native
351浏览 • 1回复 待解决
HarmonyOS 是否接入React Native框架?
209浏览 • 1回复 待解决
HarmonyOS 咨询React Native适配情况
30浏览 • 1回复 待解决
HarmonyOS react-native-screens HarmonyOS计划
38浏览 • 1回复 待解决
HarmonyOSreact native兼容问题
299浏览 • 1回复 待解决
HarmonyOS react-native如何自行打包
32浏览 • 1回复 待解决
HarmonyOS @react-native-community/checkbox修改
123浏览 • 1回复 待解决