Error Message: FetchPackageInfo: "@ohos/lottie" failed.
Original Error: NOTFOUND package '@ohos/lottie@latest' not found from all the registries.
ohpm ERROR: Found exception: Error: Invalid dependency, reached retry limit or non retryable error encountered.
ohpm ERROR: Install failed, detail: Error: Invalid dependency.
Error: 00622008 Forbidden Install Error.
Error Message: The "ohpm install " command cannot be executed when the "parameterFile" configuration exists in the project-level oh-package.json5 file.
Error Message: There are some dependency names that are inconsistent with the actual package names.
Original Error: local dependency "har2" found in "D:\XXX\XXX\oh-package.json5" does not match the actual name "har1" of its oh-package.json5.
应用/元服务支持通过包管理工具ohpm来安装、共享、分发代码,管理项目的依赖关系,ohpm install命令的作用是安装本地或远程依赖包,依赖包会存储在对应模块的oh_modules目录下。
项目级配置文件:/path/to/my/project/.ohpmrc
用户级配置文件:~/.ohpm/.ohpmrc
MacOS默认位置:~/.ohpm/.ohpmrc
windows操作系统默认位置:C:\Users\用户名\.ohpm\.ohpmrc
HarmonyOS官方仓库地址:registry=https://ohpm.openharmony.cn/ohpm/
支持多个仓库地址,以英文逗号间隔,且优先级大于registry配置,多个仓库地址的优先级按照配置顺序排序。registry=https://ohpm.openharmony.cn/ohpm/,https://repo.example.com/ohpm
@mpaas:registry=https://mpaas-ohpm.example.com/meta
ca_files=/path/to/cert
源码依赖方式存在“依赖名称不能与其所在的模块名称相同”的校验规则,当出现这种依赖时,ohpm在安装时会报ohpm ERROR: Invalid dependency错误。如题中报错,entry模块依赖了entry@1.0.0。
在工程级oh-package.json5文件中配置了parameterFile字段后,不再支持使用ohpm i 命令指定包名安装,应该在parameterFile文件中配置相应依赖,具体参考parameterFile。
当工程级build-profile.json5文件中的useNormalizedOHMUrl被配置为true时,或当.ohpmrc文件中配置enforce_dependency_key=true时,oh-package.json5中依赖的包使用的别名需要和依赖包的oh-package.json5的name保持一致。
变量名:ComSpec;
变量值:%SystemRoot%\system32\cmd.exe;