鸿蒙APP开发报错Error: The hvigor depends on the npmrc file. No npmrc file is matched in the current …… “

使用Dev Eco Studio进行鸿蒙APP开发,在构建>清理环境时报错:

Error: The hvigor depends on the npmrc file. No npmrc file is matched in the current user folder. Configure the npmrc file first.

解决方法:

在你的用户文件夹(例如 C:\Users\<YourUsername>~ 在 UNIX 系统中)中创建一个名为 .npmrc 的文件。

编辑内容如下:

registry=https://repo.huaweicloud.com/repository/npm/
@ohos:registry=https://repo.harmonyos.com/npm/

保存文件,再次运行代码,正常。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值