安装@vue/cli报错,npm ERR! gyp ERR! not ok

Posted pangqianjin

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装@vue/cli报错,npm ERR! gyp ERR! not ok相关的知识,希望对你有一定的参考价值。

执行npm install -g @vue/cli来安装vue3的cli时,出现了这个错误(太长了,具体执行到npm install joi时开始报错):

npm ERR! gyp ERR! not ok

我本身配置的是淘宝的镜像源,但是还是安装失败了,也试过用梯子+官方仓库,还是不行,
最后使用了淘宝的cnpm安装成功了,

npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install -g @vue/cli

安装成功!

以上是关于安装@vue/cli报错,npm ERR! gyp ERR! not ok的主要内容,如果未能解决你的问题,请参考以下文章

npm i安装包依赖时 gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env(

npm i安装包依赖时 gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env

gyp ERR,Npm 无法获取本地颁发者证书

npm安装为什么要安装gyp各种报错呢

npm 在安装 Vue脚手架命令(npm install -g @vue/cli)时报错安装报错--“Unexpected end of JSON input while parsing near&#

npm install时报错gyp ERR! stack Error: Can't find Python executable "2.7"