question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: yarn install hangs

See original GitHub issue

Self-service

  • I’d be willing to implement a fix

Describe the bug

$ DEBUG='*' CI=1 yarn --immutable --inline-builds

produces output to:

➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 1m 38s

and then just hangs indefinitely.

Another user described equivalent behaviour in this post:

https://discuss.circleci.com/t/install-step-hangs-when-running-yarn-berry-3-1-0/41940

To reproduce

No idea. It’s happening in a large project.

Environment

System:
    OS: macOS 11.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 16.11.1 - /private/var/folders/j0/ljpkc6ps1kb6x0ts9fmzmx3h0000gn/T/xfs-2a26e349/node
    Yarn: 3.1.0 - /private/var/folders/j0/ljpkc6ps1kb6x0ts9fmzmx3h0000gn/T/xfs-2a26e349/yarn
    npm: 8.1.4 - ~/.nvm/versions/node/v16.11.1/bin/npm
  npmPackages:
    jest: 27.3.1 => 27.3.1

Additional context

  • One of the packages comes from a private (npm.pkg.github.com) registry.
  • Downgrading to 3.0.0 does not solve the problem.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
gajuscommented, Nov 19, 2021

I suspect that this happens if you try to run yarn 3.1.0 with lockfile version 1.

Nuking yarn.lock, running yarn install and then yarn --immutable --inline-builds again worked like a charm.

1reaction
qcncommented, Nov 24, 2021

This is also happening to me when I try to run yarn 3.1.0 with a version 1 lockfile.

Read more comments on GitHub >

github_iconTop Results From Across the Web

yarn install hangs during "Fetching packages..." #764 - GitHub
yarn install hangs at fetching packages and does not provide any further information as to the cause. If the current behavior is a...
Read more >
Why does `yarn install` hang when fetching packages on ...
This issue is caused by the combination of the older version of Git installed by Yum on CentOS (1.8.3.1-6 at the time of...
Read more >
Yarn install hangs and never completes - CircleCI Discuss
Set the install command to - sleep 150 && yarn install · SSH into the node during build, stay in bash shell ·...
Read more >
Error Codes | Yarn - Package Manager
The easiest way to fix it is to use git checkout --theirs yarn.lock , and follow up with yarn install again (which can...
Read more >
Stuck on yarn install, Time out - Discourse Meta
Fixing Yarn ESOCKETTIMEDOUT Error During Discourse Setup | Mario Lurig. While installing Discourse on a free tier instance in a Google Cloud ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found