安装vue-cli时出现Install fail! Error: GET https://registry.npmmirror.com/vue-cli-g response 404 status

Install fail! Error: GET https://registry.npmmirror.com/vue-cli-g response 404 status
Error: GET https://registry.npmmirror.com/vue-cli-g response 404 status
at get (C:\Users\79883\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\get.js:68:17)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async _fetchFullPackageMeta (C:\Users\79883\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\download\npm.js:239:18)

看到楼上几个的答案醉了。
报错意思是,你访问淘宝镜像去拿vue-cli包,人服务器给你说你请求的页面不存在。事实上确实不存在。你点那个url进去是{"error":"[NOT_FOUND] vue-cli-g not found"}
为啥不存在?
因为本来就不存在这个包,你包名都搞错了。应该是:vue-cli
你加个g是要全局安装吧?搜下全局安装的命令吧好吗

用 cnpm

将npm仓库地址切换成淘宝镜像地址
npm config set registry https://registry.npm.taobao.org/

我建议你卸载重装node,官网下载稳定版的,安装到d盘(只要不是c盘就行),比如安装在D:\nodejs目录下,node安装完成后,进入nodejs,新建node_global,node_cache(有的话就不用新建)

#设置npm管理的包的存储位置,默认在C盘。避免C盘空间不足,设置到其它位置(保证存在相应目录)
#并将 “D:\nodejs\node_global” 配置到path环境变量中
npm config set prefix “D:\nodejs\node_global”
npm config set cache “D:\nodejs\node_cache”
#npm 官方源在国内访问很慢,需要使用淘宝的镜像替换npm
npm config set registry https://registry.npm.taobao.org/

最后使用管理员的方式打开cmd窗口(右键开始菜单(window图标)选择终端(管理员)执行
npm install -g @vue/cli
vue脚手架就算安装完了