如何告诉 Yarn 忽略代理环境变量?
How to tell Yarn to ignore proxy env vars?
我是 运行 Linux 并在 /etc/environment
下设置了代理环境变量,我猜 Yarn 会使用它来连接到 npm 存储库。出于某种原因,这些天代理死机了,Yarn 一直尝试连接到代理,但我没有任何机会告诉它该怎么做。我已经设置了 export http_proxy=""
和 export https_proxy=""
没有运气。我如何告诉 Yarn hey go direct.
编辑:令人惊讶的是,Yarn 不遵守我设置的任何内容。
- 传递
--proxy ""
--https-proxy ""
无效。
- 设置另一个代理环境无效。
看来 Yarn 在尊重用户配置方面存在严重问题。正在安装 npm。
不管怎样,它不应该至少提示我应该做什么吗?
在这种情况下,我会使用 unset Unix 命令来清除那些代理变量
unset http_proxy; unset https_proxy
我所做的,因为 yarn also doesn't respect the no_proxy variable,我需要它的那一部分,基本上是在我使用的 yarn 上创建一个包装器 shell 脚本。
~/bin/my_yarn.sh
unset http_proxy; unset https_proxy; yarn
然后~/bin/my_yarn.sh install
安装,或其他。
我是 运行 Linux 并在 /etc/environment
下设置了代理环境变量,我猜 Yarn 会使用它来连接到 npm 存储库。出于某种原因,这些天代理死机了,Yarn 一直尝试连接到代理,但我没有任何机会告诉它该怎么做。我已经设置了 export http_proxy=""
和 export https_proxy=""
没有运气。我如何告诉 Yarn hey go direct.
编辑:令人惊讶的是,Yarn 不遵守我设置的任何内容。
- 传递
--proxy ""
--https-proxy ""
无效。 - 设置另一个代理环境无效。
看来 Yarn 在尊重用户配置方面存在严重问题。正在安装 npm。
不管怎样,它不应该至少提示我应该做什么吗?
在这种情况下,我会使用 unset Unix 命令来清除那些代理变量
unset http_proxy; unset https_proxy
我所做的,因为 yarn also doesn't respect the no_proxy variable,我需要它的那一部分,基本上是在我使用的 yarn 上创建一个包装器 shell 脚本。
~/bin/my_yarn.sh
unset http_proxy; unset https_proxy; yarn
然后~/bin/my_yarn.sh install
安装,或其他。