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

how config yarn use chinese taobao npm mirror #2411

Closed
zhiqiang21 opened this issue Jan 8, 2017 · 8 comments
Closed

how config yarn use chinese taobao npm mirror #2411

zhiqiang21 opened this issue Jan 8, 2017 · 8 comments

Comments

@zhiqiang21
Copy link

zhiqiang21 commented Jan 8, 2017

i'm from china ,For some reason i use foreign mirror is not good . i can config yarn use chinese taobao's npm mirror ?

@Daniel15
Copy link
Member

Daniel15 commented Jan 11, 2017

Yes, you can do this! You can run

npm config set registry https://registry.npm.taobao.org

This will set it in npm's configuration (.npmrc file in your home directory), and Yarn will reuse this same configuration. Every time you install an npm package, it will come from Taobao's mirror 😃

@zhiqiang21
Copy link
Author

thanks,It works great!

@gutenye
Copy link

gutenye commented Jul 12, 2017

@Daniel15 What about @types/<package> packages.

After setup the Chinese mirror, I still get

error An unexpected error occurred: "https://registry.yarnpkg.com/@types/ws/-/ws-0.0.41.tgz: ETIMEDOUT".
yarn --version
0.27.5

@gutenye
Copy link

gutenye commented Jul 12, 2017

@Daniel15 Never mind, fixed by remove yarn.lock

@broven
Copy link

broven commented Mar 6, 2018

try:
yarn config set registry 'https://registry.npm.taobao.org'

@jjhesk
Copy link

jjhesk commented Mar 21, 2018

how do you revert the changes?

@mul14
Copy link

mul14 commented May 24, 2018

@jjhesk you can run this command

npm config delete registry
# or
yarn config delete registry

Or delete registry key manually in ~/.npmrc or ~/.yarnrc file.

@SEAFERN
Copy link

SEAFERN commented Jul 12, 2019

  • npm install -g yrm
  • yrm ls
    • yarn use taobao
    • yrm test taobao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants