"D:\Program Files\Huawei\DevEco Studio\tools\node\node.exe" "D:\Program Files\Huawei\DevEco Studio\tools\hvigor\bin\hvigorw.js" clean --mode module assembleHap --analyze=normal --parallel --incremental --daemon
Installing pnpm@8.13.1...
npm ERR! code ETARGET
npm ERR! notarget No matching version found for pnpm@8.13.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in: C:\Users\Administrator\AppData\Local\npm-cache\_logs\2024-09-09T05_44_38_588Z-debug-0.log
Error: D:\Program Files\Huawei\DevEco Studio\tools\node\npm.cmd install,pnpm execute failed.See above for details.
Process finished with exit code -1
将c盘用户下的.npmrc文件的registry改为https://repo.huaweicloud.com/repository/npm/
文件位置为
C:\Users\Administrator\.npmrc
可用文本文件打开后,将文件内容更改为一下部分
prefix=C:\Users\Administrator\AppData\Roaming\npm
registry=https://repo.huaweicloud.com/repository/npm/
可以正常运行
解决方案来自华为论坛