记录一些npm 有关的问题(杂乱记录)

git config --global url."https://".insteadOf git://

1、npm查看与设置镜像源地址

1、查看当前镜像源地址

npm get registry

2、删除镜像地址(会恢复默认地址)

npm config delete registry

3、设置镜像地址

默认源地址 源地址

  npm config set registry https://registry.npmjs.org/

淘宝镜像地址

npm config set registry https://registry.npmmirror.com

如果没安装过淘宝镜像源的,则直接安装

npm install -g cnpm --registry=https://registry.npmmirror.com

淘宝npm镜像源换新地址了,原文链接淘宝npm镜像源换新地址_Henry_楠的博客-CSDN博客_npm镜像源

2、VUE npm install 使用出现git@github.com: Permission denied (publickey) 

原文链接VUE npm install 使用出现git@github.com: Permission denied (publickey)_yangshuainan的博客-CSDN博客

3、npm install 时遇到的报错

C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/adobe-webplatform/eve.git

git config --global url."https://".insteadOf git://

C:\Program Files\Git\cmd\git.EXE ls-remote -h -t https://github.com/nhn/raphael.git

ipconfig /flushdns

fatal: unable to access ‘https://github.com/nhn/raphael.git/’: OpenSSL SSL_read: Connection was reset, errno 10054

产生原因:一般是这是因为服务器的SSL证书没有经过第三方机构的签署,所以才报错

参考网上解决办法:解除ssl验证后

git config --global http.sslVerify false

npm ERR Error while executing: npm ERR C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@

原文链接npm ERR Error while executing: npm ERR C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@_你邻座的怪同学的博客-CSDN博客

npm install --registry=https://registry.npm.taobao.org

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值