Yarn Install freezes in circleci while it runs successfully when I SSH into the runner

#!/bin/bash -eo pipefail

Install missing package when running on self host runner

yarn install
1yarn install v1.22.19
[1/4] Resolving packages…
[2/4] Fetching packages…
[3/4] Linking dependencies…
[4/4] Building fresh packages…

Too long with no output (exceeded 10m0s): context deadline exceeded

Even with verbose same thing.

I started having this exact same problem. Have not yet discovered a solution.

Actually

  • removed puppeteer from dependency
  • upgraded puppeteer to 22.x
    This got the yarn install to complete successfully but we have another issue but will be resolved

Thanks for your reply! In fact “puppeteer” is one of my package’s dependencies as well, so it seems likely that the “yarn install” hang is somehow related to that.

I came back to share my hack workaround for the hang in the “Building fresh packages” step. This exits the “yarn install” early if it sees the “Building fresh packages” line.

      - run: |
          (yarn install --non-interactive &) |
          while read l; do
            echo ">$l"
            if [[ "$l" == *'Building fresh packages...'* ]]; then
              sleep 4
              break
            fi
          done

Upgrading puppeteer to version 22.13.1 also resolved the “yarn install” issue for me. Thanks!