(原创)解决Vue-cli安装问题:npm ERR! notarget No matching version found for @babel/helper-compilation-targets@^7.22.15.
配置:Windows 11,Vue 2
安装vue-cli遇到如下报错:
E:\project\Vue_pojt>npm install -g @vue/cli
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @babel/helper-compilation-targets@^7.22.15.
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:
npm ERR! C:\Users\CZJ\AppData\Local\npm-cache\_logs\2023-09-08T06_18_44_539Z-debug-0.log
尝试了很多办法都没有解决,突然想到node.js的环境变量是配置在用户环境变量下的,于是想尝试一下把node.js配置到系统环境变量下,配置之后就下载成功了。
vue ui运行成功的截图: