npm失败

修改C:\Users\用户名下的.gitconfig文件


[url “https://github.com/nhn/raphael.git/”]
        insteadOf = ssh://git@
改为(注意不要删除第二行的缩进)
[url “https://github.com/nhn/raphael.git/”]
        insteadOf = git://github.com/nhn/raphael.git/
保存文件,再次用npm install,成功安装。

  • 先删除 node_modules 文件夹(在vue-element-admin文件夹下,不是node.js下的node_modules)
  • 运行 npm cache clean --force清除缓存。
  • 接着再 npm install,尽量不要cnpm,可能出现bug
  • (npm镜像源一定要配置)
  • 一次不行多试几次

版权声明:本文为weixin_46972395原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。