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

Is there a mirror we chinese could use? #982

Closed
2 tasks
taoqf opened this issue Feb 22, 2020 · 9 comments
Closed
2 tasks

Is there a mirror we chinese could use? #982

taoqf opened this issue Feb 22, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@taoqf
Copy link

taoqf commented Feb 22, 2020

  • I'd be willing to implement this feature
  • This feature can already be implemented through a plugin

Describe the user story

The network is blocked in our country, when we run yarn set version berry there will be an net error because the domain https://raw.githubusercontent.com/yarnpkg/berry/master/packages/berry-cli/bin/berry.js is blocked. this is the error

Resolving berry to a url...
Downloading https://github.com/yarnpkg/berry/raw/master/packages/berry-cli/bin/berry.js...
error An unexpected error occurred: "https://github.com/yarnpkg/berry/raw/master/packages/berry-cli/bin/berry.js: connect ECONNREFUSED 151.101.228.133:443".
info If you think this is a bug, please open a bug report with the information provided in "/home/taoqf/myproj/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/policies for documentation about this command.

Describe the solution you'd like

Maybe we can use an mirror options to change the url to https://cdn.jsdelivr.net/gh/yarnpkg/berry/packages/berry-cli/bin/berry.js or other url , or even a local file.

@taoqf taoqf added the enhancement New feature or request label Feb 22, 2020
@liyachun01
Copy link

liyachun01 commented Jun 27, 2020

if you are behind a proxy, use it. for instance, in your .bashrc/anyrc file, prepend "export http_proxy=[your proxy]" will do. Or maybe you can try yarn config set proxy/https-proxy before yarn set version berry. You know what a proxy means I assume 🐶

@nyaapass
Copy link

nyaapass commented Jul 26, 2020

it can be solved by setting up a proxy:

https://www.jhipster.tech/configuring-a-corporate-proxy#yarn-configuration

@John0King
Copy link

maybe just install it globally with npm install -g yarn ?

@arcanis
Copy link
Member

arcanis commented Oct 23, 2020

I'm in the process of setting up a light proxy so that future yarn set version calls will hit yarnpkg.com rather than the GitHub servers.

@John0King
Copy link

@arcanis I'm still think use npm directly is a much simpler solution.
a) have you count the project in github that use yarn2 insteal of yarn 1 ?
b) does thoese project want to use yarn2 ?
c) does any feature in yarn1 is not supported in yarn2

if the anser is
a) most project use yarn1
b) they want to use yarn2
c) no or only a few feature that not very commonly used.

then I want just to install latest yarn by npm insatll -g yarn

and infact , to use locale version of yarn(any npm packge) is possible :

{
 "scripts":{
       "yarn" : "./node_modules/yarn/yarn.cmd || ./node_modules/yarn/yarn.sh",
        "tsc" :"./node_modueles/typescript/tsc.cmd",
       "build": "yarn run yarn  run  tsc" 
        // here we make the latest yarn to detect the `yarn` script , and use that directly without the `yarn run yarn` prefix 
   }

}

or even better, directly detect the yarn package in devDependencies section of package.json

@John0King
Copy link

and please at least to make a discussion in your team

@arcanis
Copy link
Member

arcanis commented Jul 18, 2021

New versions will use the Yarn website as source for the binaries (specifically, repo.yarnpkg.com).

@AsceticBoy
Copy link

@arcanis when support it

@uwang
Copy link

uwang commented Sep 3, 2024

use yarn@1 for no other way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants