yarn icon indicating copy to clipboard operation
yarn copied to clipboard

yarn需要像npm一样配置代理么?

Open yuanyuanshen opened this issue 9 years ago • 8 comments

公司网络需要配置代理。npm配置完可以正常下载依赖包,但是安装完yarn之后连不上网, yarn config set proxy http://XX 依然连不上网

yuanyuanshen avatar May 16 '17 07:05 yuanyuanshen

可以列出你用的步骤吗? 不太懂 “安装完yarn之后连不上网” 是什么意思。你是不是有自己的npm服务器?

Sunyang730 avatar May 16 '17 18:05 Sunyang730

Make sure you also set the HTTPS proxy. 确保您还设置HTTPS代理。 ( from Google Translate. Hope that is close enough to understand 😃 )

yarn config set proxy http://XX
yarn config set https-proxy http://XX

rally25rs avatar May 16 '17 19:05 rally25rs

maybe yarn config set strict-ssl false is useful, too.

yfwz100 avatar Jun 07 '18 07:06 yfwz100

用shadowsocks NG的话,设置开启HTTP代理服务器,监听地址改为0.0.0.0 yarn config set proxy http://0.0.0.0:1087 yarn config set proxy https://0.0.0.0:1087

shouhuori avatar Dec 14 '18 03:12 shouhuori

Make sure you also set the HTTPS proxy. 确保您还设置HTTPS代理。 ( from Google Translate. Hope that is close enough to understand 😃 )

yarn config set proxy http://XX
yarn config set https-proxy http://XX

Works, Great Thanks!

tonywangcn avatar May 14 '19 15:05 tonywangcn

如果用了 ShadowSocks NG 的代理,查看偏好设置 -> HTTP, 如下图:

image

接着在命令行如下:

yarn config set proxy http://127.0.0.1:1087
yarn config set https-proxy http://127.0.0.1:1087

sueLan avatar Jun 12 '19 10:06 sueLan

Make sure you also set the HTTPS proxy. 确保您还设置HTTPS代理。 ( from Google Translate. Hope that is close enough to understand 😃 )

yarn config set proxy http://XX
yarn config set https-proxy http://XX

人才

will-hu-0 avatar Mar 06 '21 13:03 will-hu-0

感謝分享

這邊留言一下讓未來可以方便查詢

jjasoncool avatar Feb 23 '22 06:02 jjasoncool