1、出现问题原因
安装一个新仓库代码的依赖包,如输入npm install或yarn install,出现如题错误
2、解决办法
1)升级node.js 下载地址:https://nodejs.org/zh-cn/download/
具体教程可以查看往期文章:nodejs 环境变量配置
2)打开cmd(快捷键 win r)控制台依次运行如下命令
npm install @vue/cli --unsafe-perm
(also works with-g
)npm install @vue/cli-service --unsafe-perm
(also works with-g
)
3)此时,删除刚才安装的node_modules模块文件夹,重新输入 npm install或yarn install,大功告成
3、参考
Yorkie installation fails which causes Vue CLI to fail #3056
Cannot install @vue/cli-service on Linux aarch64 because "Failed at the yorkie@2.0.0 install script." #3466