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

fix: yarn install fails when release is tagged in GitHub but not yet published on yarnpkg.com #141

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

eszjay
Copy link
Contributor

@eszjay eszjay commented Mar 16, 2022

We should check the latest version at the same source we will download from.
In this solution, we use the package.json published on https://yarnpkg.com/package/yarn to resolve the latest version.

At the time of the problem, version 1.22.18 was tagged as a release on GitHub but 1.22.17 was the latest version on yarnpkg.com.
The error was:

Latest version of Yarn is 1.22.18
Checking if YARN is already installed...
A different version of Yarn is installed (1.22.17); removing it
Installing YARN v1.22.18

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
mv: cannot stat ‘yarn-v1.22.18/*’: No such file or directory

Exited with code exit status 1

CircleCI received exit code 1

@eszjay eszjay requested a review from a team as a code owner March 16, 2022 04:20
Copy link
Contributor

@KyleTryon KyleTryon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Thank you very much

@KyleTryon KyleTryon self-requested a review March 28, 2022 15:29
Copy link
Contributor

@KyleTryon KyleTryon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eszjay sorry, could I ask you to rebase your PR? We recently updated our CI pipeline and what is happening is the config file for this branch is still being executed, rather than the new config.

Thank you 🙇

…ublished on yarnpkg.com

We should check the latest version at the same source we will download from. 1.22.18 was tagged for release on GitHub but 1.22.17 was the latest version on yarnpkg.com.
The error was:

Latest version of Yarn is 1.22.18
Checking if YARN is already installed...
A different version of Yarn is installed (1.22.17); removing it
Installing YARN v1.22.18

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
mv: cannot stat ‘yarn-v1.22.18/*’: No such file or directory

Exited with code exit status 1

CircleCI received exit code 1
@eszjay
Copy link
Contributor Author

eszjay commented Mar 29, 2022

It is rebased, but it looks like the tests did not run. Do they run on branches from forks?

@KyleTryon
Copy link
Contributor

It is rebased, but it looks like the tests did not run. Do they run on branches from forks?

Totally expected 🙇 thank you. We disable building PRs for security reasons and spam. I can trigger the build on my end though by pulling it into a new branch to trigger the same commit.

Starting the tests now but they should be the same so we expect this will go fine.

@orb-publisher
Copy link

Your development orb has been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link:
https://circleci.com/developer/orbs/orb/circleci/node?version=dev:bcf4fc779c1a3b976459ed17147f5ee96fef6210

@KyleTryon KyleTryon self-requested a review March 30, 2022 15:07
@KyleTryon
Copy link
Contributor

Ok It took me a moment but I wanted to make sure we have a solid link between yarn and this CDN and it does appear approved in the link you provided, I just wanted to picture that here:
image

When Iw as searching I did discover this though. It does not need to be addressed in this PR but good to know going forward.

The preferred way to manage Yarn is through Corepack, a new binary shipped with all Node.js releases starting from 16.10. It acts as an intermediary between you and Yarn, and lets you use different package manager versions across multiple projects without having to check-in the Yarn binary anymore.

@KyleTryon KyleTryon changed the title Fix yarn install fails when release is tagged in GitHub but not yet published on yarnpkg.com fix: yarn install fails when release is tagged in GitHub but not yet published on yarnpkg.com Mar 30, 2022
@KyleTryon KyleTryon merged commit 41faea4 into CircleCI-Public:master Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants