ChrisFreeMan:
目前遇到的问题是在设置代理的情况下,npm install 命令一直失败,原因找了下貌似是 https 连接的问题,
我是通过.zshrc 文件来指向本地的代理地址,通过这个地址指向我的 ss 代理。
以下是设置其一
export http_proxy="http://127.0.0.1:1087"
export https_proxy="http://127.0.0.1:1087"
第二种设置是指向 socks5 本地地址,然后都失败了。
curl 和 brew 命令都正常。
目前唯一有用的方法是将 npm 的仓库地址指向为 http 地址
npm config set registry http://registry.npmjs.org
虽然可以用,但是每次安装包都会发出警告⚠️,这就很烦了,大佬们是怎么搞定的。
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
from V2EX-最新主题 https://ift.tt/zJF5NpA
- 本文固定链接: https://niul.net/372407.html
- 转载请注明: 分享菌 于 牛叻网(NiuL.Net) 发表