0
点赞
收藏
分享

微信扫一扫

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

莞尔小迷糊 2022-04-21 阅读 69
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

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

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@

举报

相关推荐

0 条评论