我尝试在Windows 10计算机上使用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...
对于为什么会发生这种情况的任何想法都很受欢迎。
答案 0 :(得分:2)
我遇到了同样的问题,并通过以下步骤解决了该问题:
运行以下终端命令
对我有用。
答案 1 :(得分:1)
只需点击此链接即可 https://yarnpkg.com/lang/en/docs/cli/config/ 并删除https代理,它对我有用。
答案 2 :(得分:1)
纱线版本2需要不同的变量名称:
updateList(JSON.parse(e.target.result));