代理设置如下:
➜ ~ env | grep -i proxy
no_proxy=localhost,127.0.0.1,localaddress,.localdomain.com
NO_PROXY=localhost,127.0.0.1,localaddress,.localdomain.com
https_proxy=http://127.0.0.1:7890
http_proxy=http://127.0.0.1:7890
all_proxy=socks5://127.0.0.1:7890
测试命令:
$ yarn add react-native-geolocation-service
yarn add v1.22.17
[1/4] 🔍 Resolving packages...
info There appears to be trouble with your network connection. Retrying...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
info All dependencies
└─ [email protected]
✨ Done in 5.22s.
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
任何使用 yarn add 的命令都会先提示一下网络问题重试, 然后才能进行安装, 安装完成后还会提示两三次网络问题. 最后才完成.
虽然不影响安装, 但每次这样会浪费点时间.
