使用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/
保存文件,再次运行代码,正常。