Recently I've upgraded my node version to 16.15.1. Before the node upgrade I used a 1.x yarn version. Now I want to use yarn v3.2.x
in my project.
Normally this would be achieved by executing the command yarn init -2
in the console. This would generate a .yarn/releases
folder in my project where the yarn-[version].cjs
is stored. Furthermore, in the project .yarnrc.yml
the line yarnPath: .yarn/releases/yarn-[version].cjs
is added.
However, I have the problem that I work in a closed working environment. When I execute the command yarn init -2
I get problems with the proxy.
This is the error I get:
error An unexpected error occurred: "https://github.com/yarnpkg/berry/raw/master/packages/yarnpkg-cli/bin/yarn.js: connect ECONNREFUSED xxx.x".
I tried to set the proxy in the project and also in the user .yarnrc.yml
but both didn't seem to work.
My question is whether there is a possibility to add a proxy url to the yarn init -2
command, e.g. via a cmd flag?