我尝试在Windows10机器上使用yarn和react-native来运行一个构建作业。以下命令在jenkins内部执行,以准备本机Windows应用程序的实际构建。
yarn config set proxy http://192.109.190.88:8080
yarn config set https-proxy http://192.109.190.88:8080
yarn add react-native 这将导致以下输出,尽管代理设置是正确的(也尝试了"http://192.109.190.88:8080/“):
yarn add v0.27.5
[1/4] Resolving packages...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...任何关于为什么会发生这种情况的想法都是值得赞赏的。
发布于 2018-04-06 14:41:59
发布于 2020-09-02 21:50:44
yarn版本2需要不同的变量名:
yarn config set httpProxy http://...
yarn config set httpsProxy http://...发布于 2020-01-15 03:42:50
我遇到了同样的问题,并通过以下步骤解决了这个问题:
运行以下终端命令
网络Npm缓存清理--强制代理服务器设置http_proxy=
<代码>H113重新启动终端网络-网络-超时100000 <代码>H218<代码>H119重新启动终端<代码>H220<代码>G221
这对我很管用。
https://stackoverflow.com/questions/45631761
复制相似问题