-
Notifications
You must be signed in to change notification settings - Fork 82
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 installation fails if Yarn policies are in use #117
Comments
Thanks! Will take a look into this and get back to you shortly 👍 |
This was reported in the community forum, and I've also been running into it. A user there reported that they tracked it down to a certificate check. |
Hi! After looking into this further, I'm wondering if installing yarn here is redundant as it looks like the |
@Jaryt I agree, it would be better to use the executable in We alias The first option is a little frustrating because we'd have to update the file any time we upgrade Yarn. The second version works better, but is a little messy. Mostly, it's just surprising that the installation fully fails if Yarn policies are used. |
@gggritso I see! Thanks for that description of the issue. Seems like the way forward would be to automatically alias (todo: confirm that is what yarn is actually doing in the set-version script) to the |
@Jaryt that's great, thank you! |
Hi @gggritso Sorry for the delay here, had my hands full with some other tasks. I'm implementing the fix right now, and the solution actually quite simple. Since the |
@Jaryt thank you very much for fixing this! |
Orb version:
5.0.0
What happened:
I'm using Yarn policies (e.g.,
yarn policy set-version 1.22.11
) to bundle Yarn with my app..yarnrc
looks like this:I'm trying to use this orb to install Node and Yarn, like so:
This downloads the latest stable version of Yarn, which is
1.22.17
at the time of writing. Unfortunately, the installation process fails at the end with this error:This happens because after the Yarn installation is complete (
1.22.17
is successfully installed)yarn --version
returns1.22.11
, which is the version specified in.yarnrc
. This mismatch causes the process to exit.Expected behavior:
I'm not sure, to be honest! A few options are possible:
.yarnrc
that would helpI could hard-code the Yarn version in the task config, but that defeats the purpose of using
.yarnrc
. I could also somehow parse.yarnrc
myself and extract the version, but that's theyarn
executable's job. Any advice here would be appreciated!The text was updated successfully, but these errors were encountered: