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

[Bug?]: yarn fails to run with TypeError #6654

Open
1 task
esimkowitz opened this issue Jan 14, 2025 · 7 comments
Open
1 task

[Bug?]: yarn fails to run with TypeError #6654

esimkowitz opened this issue Jan 14, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@esimkowitz
Copy link

Self-service

  • I'd be willing to implement a fix

Describe the bug

As of about 30 mins ago, I am unable to use Yarn. It seems like there's something invalid in https://repo.yarnpkg.com/4.6.0/packages/yarnpkg-cli/bin/yarn.js

I thought it might be an issue with my Yarn version (I was on 4.5.1) so I tried updating my packageManager to the latest.

When I run yarn after updating my packageManager in package.json, I get the following error:

! Corepack is about to download https://repo.yarnpkg.com/4.6.0/packages/yarnpkg-cli/bin/yarn.js
? Do you want to continue? [Y/n] y

➤ YN0001: TypeError: Invalid version. Must be a string. Got type "object".
    at new t (xxxx/.cache/node/corepack/v1/yarn/4.6.0/yarn.js:132:14299)
    at Oje (xxxx/.cache/node/corepack/v1/yarn/4.6.0/yarn.js:132:19226)
    at Object.Vje [as gt] (xxxx/.cache/node/corepack/v1/yarn/4.6.0/yarn.js:132:19778)
    at xxxx/.cache/node/corepack/v1/yarn/4.6.0/yarn.js:456:16130
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Nt.start (xxxx/.cache/node/corepack/v1/yarn/4.6.0/yarn.js:176:1995)
    at async xE.execute (xxxx/.cache/node/corepack/v1/yarn/4.6.0/yarn.js:456:15488)
    at async xE.validateAndExecute (xxxx/.cache/node/corepack/v1/yarn/4.6.0/yarn.js:94:787)
    at async t.run (xxxx/.cache/node/corepack/v1/yarn/4.6.0/yarn.js:98:3249)
    at async HDt (xxxx/.cache/node/corepack/v1/yarn/4.6.0/yarn.js:744:7928

Any thoughts? Could it be an upstream issue with corepack?

To reproduce

For me, all I had to do was run yarn to get it to repro. I'm connected to the internet and NodeJS version is v22.13.0

Environment

I can't get Yarn to run so here's my details manually:
  macOS: 15.2 (24C101)
  nodeJS: 22.13.0
  Yarn: 4.5.1 and 4.6.0

Additional context

No response

@esimkowitz esimkowitz added the bug Something isn't working label Jan 14, 2025
@austinamorusoyardstick
Copy link

Getting the same error I thought I was going crazy

@sawka
Copy link

sawka commented Jan 14, 2025

Just started for me too within the last 30 minutes. running "yarn" just hangs. same stack trace.

@ElliottAtYardstick
Copy link

Same error. Multiple reports coming through the Discord support channels as well.

@esimkowitz
Copy link
Author

It's working for me now, not sure what changed

@esimkowitz
Copy link
Author

Can someone from the Yarn team provide a postmortem on what happened?

@clemyan
Copy link
Member

clemyan commented Jan 14, 2025

Probably related to the GitHub outage earlier

@arcanis
Copy link
Member

arcanis commented Jan 14, 2025

Very likely indeed; I suspect the API started returning null on the latest tags in https://repo.yarnpkg.com/tags, causing a failure in the subsequent semver.gt comparison that checks once a day if Yarn is up-to-date. Now that we know it can happen we should update the types and guard against that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants