Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yuanyuanshen opened this issue May 16, 2017 · 8 comments
Closed

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

yuanyuanshen opened this issue May 16, 2017 · 8 comments
Labels

Comments

@yuanyuanshen
Copy link

yuanyuanshen commented May 16, 2017

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

@Sunyang730
Copy link

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

@rally25rs
Copy link
Contributor

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

@yfwz100
Copy link

yfwz100 commented Jun 7, 2018

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

@shouhuori
Copy link

用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

@tonywangcn
Copy link

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!

@sueLan
Copy link

sueLan commented Jun 12, 2019

如果用了 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

@will-hu-0
Copy link

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

人才

@jjasoncool
Copy link

感謝分享

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

@yarnpkg yarnpkg locked as resolved and limited conversation to collaborators Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

10 participants