Closed taoqf closed 3 years ago
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 🐶
it can be solved by setting up a proxy:
https://www.jhipster.tech/configuring-a-corporate-proxy#yarn-configuration
maybe just install it globally with npm install -g yarn
?
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.
@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
and please at least to make a discussion in your team
New versions will use the Yarn website as source for the binaries (specifically, repo.yarnpkg.com
).
@arcanis when support it
use yarn@1 for no other way
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 domainhttps://raw.githubusercontent.com/yarnpkg/berry/master/packages/berry-cli/bin/berry.js
is blocked. this is the errorDescribe 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.