# Yarn frozen-lockfile times out

**URL:** <https://discuss.circleci.com/t/yarn-frozen-lockfile-times-out/51544>\
**Category:** Build Environment\
**Created:** [July 26, 2024, 2:12pm UTC](https://discuss.circleci.com/t/yarn-frozen-lockfile-times-out/51544 "2024-07-26T14:12:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisdenton-ct](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/chrisdenton-ct/32/34068_2.png) [@chrisdenton-ct](https://discuss.circleci.com/u/chrisdenton-ct)\
**Post date:** [July 26, 2024, 2:12pm UTC](https://discuss.circleci.com/t/yarn-frozen-lockfile-times-out/51544/1 "2024-07-26T14:12:41Z")

</div>

We’ve had a pipeline running for several years, with a job that executes

```auto
yarn --frozen-lockfile --cache-folder ~/.cache/yarn

```

Yesterday, with no changes, this command suddenly started hanging, and then timing out after 10 minutes. Adding the --verbose flag tell me precisely nothing. Every change I’ve made to the config (bigger docker instance, clean cache etc) makes absolutely no difference.

The command completes normally when executed on a laptop.

Has anyone encountered this issue before? At the moment, we’re pretty much at a loss to work out what the problem is.

---

<div class="post-metadata">

**Author:** ![tomekdev](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/tomekdev/32/35124_2.png) [@tomekdev](https://discuss.circleci.com/u/tomekdev)\
**Post date:** [July 29, 2024, 9:59am UTC](https://discuss.circleci.com/t/yarn-frozen-lockfile-times-out/51544/2 "2024-07-29T09:59:58Z")

</div>

I think I have the same issue but with `pnpm`. It just hangs:

```auto
pnpm install
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +2122

Progress: resolved 2122, reused 0, downloaded 0, added 0
Progress: resolved 2122, reused 1, downloaded 364, added 344
Progress: resolved 2122, reused 1, downloaded 943, added 937
Progress: resolved 2122, reused 1, downloaded 1578, added 1575
Progress: resolved 2122, reused 1, downloaded 2113, added 2112
Progress: resolved 2122, reused 1, downloaded 2117, added 2121
Progress: resolved 2122, reused 1, downloaded 2117, added 2122, done
.../core-js@2.6.12/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../node_modules/puppeteer postinstall$ node install.js
.../node_modules/@percy/core postinstall$ node ./post-install
.../core-js@2.6.12/node_modules/core-js postinstall: Done
.../node_modules/@percy/core postinstall: Done
.../node_modules/puppeteer postinstall: Chrome (116.0.5845.96) downloaded to /home/circleci/.cache/puppeteer/chrome/linux-116.0.5845.96

```

Works properly locally. I also SSHed to the container and ran `pnpm install` from there (`--frozen-lockfile` on CI by default) and it works 🤔

**Anyone from the CircleCI team that can take a look into this?** It looks like the “installing dependencies” step doesn’t see the task ended.

---

<div class="post-metadata">

**Author:** ![tomekdev](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/tomekdev/32/35124_2.png) [@tomekdev](https://discuss.circleci.com/u/tomekdev)\
**Post date:** [July 29, 2024, 12:13pm UTC](https://discuss.circleci.com/t/yarn-frozen-lockfile-times-out/51544/3 "2024-07-29T12:13:50Z")

</div>

It might be connected to `puppeteer` and its `postinstall` script. I removed the dependency and the “install dependencies” step doesn’t hang anymore 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![vijay](https://avatars.discourse-cdn.com/v4/letter/v/4bbf92/32.png) [@vijay](https://discuss.circleci.com/u/vijay)\
**Post date:** [July 29, 2024, 1:54pm UTC](https://discuss.circleci.com/t/yarn-frozen-lockfile-times-out/51544/4 "2024-07-29T13:54:51Z")

</div>

same here any updates on this

---

<div class="post-metadata">

**Author:** ![exarkun](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/exarkun/32/21935_2.png) [@exarkun](https://discuss.circleci.com/u/exarkun)\
**Post date:** [July 29, 2024, 2:37pm UTC](https://discuss.circleci.com/t/yarn-frozen-lockfile-times-out/51544/5 "2024-07-29T14:37:10Z")

</div>

Our CI jobs which have been running fine for months / years and until late last week had `npm ci` step that took \<1 minute now have `npm ci` take 12 minutes.

In our local dev environments, `npm ci` still takes \<1 minute.

---

<div class="post-metadata">

**Author:** ![exarkun](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/exarkun/32/21935_2.png) [@exarkun](https://discuss.circleci.com/u/exarkun)\
**Post date:** [July 29, 2024, 3:23pm UTC](https://discuss.circleci.com/t/yarn-frozen-lockfile-times-out/51544/6 "2024-07-29T15:23:45Z")

</div>

puppeteer ends up as the culprit for us as well. I added

```auto
PUPPETEER_DOWNLOAD_BASE_URL: "https://storage.googleapis.com/chrome-for-testing-public"

```

to the environment for our install steps, as suggested on [[Bug]: yarn postinstall hangs after browser download · Issue #12833 · puppeteer/puppeteer · GitHub](https://github.com/puppeteer/puppeteer/issues/12833), and it’s back to its regular runtime.
