HarmonyOS 鸿蒙Next DevEco Studio 3.1.0.500版本从3月21日开始新建项目同步数据失败 No matching version found for @babel/helper-replace-supers@^7.24.1
HarmonyOS 鸿蒙Next DevEco Studio 3.1.0.500版本从3月21日开始新建项目同步数据失败 No matching version found for @babel/helper-replace-supers@^7.24.1
Progress: resolved 141, reused 141, downloaded 0, added 0
WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
ERR_PNPM_NO_MATCHING_VERSION No matching version found for @babel/helper-replace-supers@^7.24.1
This error happened while installing the dependencies of @ohos/hvigor-ohos-plugin@2.1.1
at @ohos/hvigor-arkts-compose@2.1.1
at @babel/plugin-proposal-class-properties@7.8.3
at @babel/helper-create-class-features-plugin@7.24.1
The latest release of @babel/helper-replace-supers is “7.22.20”.
Other releases are:
-
esm: 7.21.4-esm.4
-
next: 8.0.0-alpha.7
If you need the full list of all 87 published versions run “$ pnpm view @babel/helper-replace-supers versions”.
Progress: resolved 181, reused 181, downloaded 0, added 0
> hvigor ERROR: C:\Users\1.hvigor\wrapper\tools\node_modules.bin\pnpm.cmd execute failed.
Process finished with exit code -1
您好,可以考虑升级一下deveco studio的版本到4.0
https://gitee.com/openharmony/docs/tree/master/zh-cn/release-notes
更多关于HarmonyOS 鸿蒙Next DevEco Studio 3.1.0.500版本从3月21日开始新建项目同步数据失败 No matching version found for @babel/helper-replace-supers@^7.24.1的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
HarmonyOS鸿蒙Next DevEco Studio 3.1.0.500版本在3月21日后新建项目时出现同步数据失败,提示“No matching version found for @babel/helper-replace-supers@^7.24.1”,可能是由于依赖包版本不匹配或NPM仓库中缺少指定版本的包导致的。可以尝试以下步骤解决:
- 检查
package.json
文件,确认@babel/helper-replace-supers
的版本是否为^7.24.1
,若版本不匹配,更新到可用的最新版本。 - 清理NPM缓存,执行
npm cache clean --force
,然后重新同步项目。 - 若问题依旧,尝试删除
node_modules
文件夹和package-lock.json
文件,重新执行npm install
。
如果问题仍未解决,可能是NPM仓库的问题,可以尝试使用其他镜像源,如淘宝NPM镜像:
npm config set registry https://registry.npm.taobao.org
然后再次执行npm install
。
确保DevEco Studio和Node.js版本为最新,以避免兼容性问题。