Skip to content

1、没有权限

原文地址:

解决前端项目初始化报错 npm ERR command git --no-replace-objects ls-remote ssh://git@github-com/nhn/raphael-git

在github上clone下来的vue项目,项目初始化(npm install)报错,如图

我自己遇到的问题是自己电脑本地上git环境配置的是Gitee的ssh,再添加上github的ssh就可以了

可以参考:

Windows配置Github、Gitee共存的Git环境

这种一般是因为网络原因,设置淘宝镜像即可。

<font style="color:rgb(51, 51, 51);background-color:rgb(248, 248, 248);">npm config set registry https:</font>_<font style="color:rgb(153, 153, 136);">//registry.npmmirror.com</font>_

3、node-sass/sass-loader 版本对应问题

在npm install时,经常会报node-sass版本与node版本不兼容的问题。碰到这种情况,首先检查下自己本地的node版本和node-sass版本。

node与node-sass具体的版本对应: