HarmonyOS鸿蒙Next中ohpm ERROR: Install failed request to httpsory/api/npm/ 数据源没及时更新,请问现在我用那个数据源

HarmonyOS鸿蒙Next中ohpm ERROR: Install failed request to httpsory/api/npm/ 数据源没及时更新,请问现在我用那个数据源

/Users/Library/Huawei/ohpm/bin/ohpm install --registry [https://repo.harmonyos.com/ohpm/](https://repo.harmonyos.com/ohpm/) ohpm ERROR: Install failed request to [https://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/product_npm/@ohos/hypium/-/@ohos/hypium-1.0.6.tgz](https://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/product_npm/@ohos/hypium/-/@ohos/hypium-1.0.6.tgz) failed, reason: getaddrinfo ENOTFOUND cmc.centralrepo.rnd.huawei.com
![](https://alliance-communityfile-drcn.dbankcdn.com/FileServer/getFile/cmtybbs/479/307/207/2850086000479307207.20230811071456.29245449322829443291362770508380:50001231000000:2800:29721F2D5054460FB90C4EE9768F9F4121C8B0CBC37C3939B8ABDA4D68503DC7.png)

更多关于HarmonyOS鸿蒙Next中ohpm ERROR: Install failed request to httpsory/api/npm/ 数据源没及时更新,请问现在我用那个数据源的实战教程也可以访问 https://www.itying.com/category-93-b0.html

2 回复

你好,麻烦截图看下“users/用户名/.ohpm”目录下**.ohpmrc**文件的配置信息

更多关于HarmonyOS鸿蒙Next中ohpm ERROR: Install failed request to httpsory/api/npm/ 数据源没及时更新,请问现在我用那个数据源的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


在HarmonyOS鸿蒙Next中遇到ohpm安装失败的问题,可能是由于默认的npm数据源未及时更新。建议您切换到国内常用的镜像源,如淘宝npm镜像。可以通过以下命令更改数据源:

ohpm config set registry https://registry.npmmirror.com

这将使用淘宝的npm镜像作为数据源,通常能提供更稳定和及时的包更新。

回到顶部