pnpm: Installs fail with ERR_PNPM_FETCH_429 in some environments
Last pnpm version that worked
9.15.2
pnpm version
9.15.3
Code to reproduce the issue
Running docker build . of our public repo https://github.com/jsdelivr/globalping-dash-directus (checkout commit 6d415b32da344f748da8b57bcbc02d09f874b24f as I’m going to pin 9.15.2 for now), which contains a pnpm install command.
Expected behavior
Dependencies install as usual.
Actual behavior
We’re seeing a great number of network-related errors, but only with pnpm 9.15.3. Downgrading to 9.15.2 fixes the problem immediately:
WARN GET https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.[15](https://github.com/jsdelivr/globalping-dash-directus/actions/runs/12395977588/job/35323844519#step:4:16).tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz error (ERR_PNPM_FETCH_429). Will retry in 10 seconds. 2 retries left.
Additional information
I can reproduce this reliably in:
- Docker on Windows locally,
- GitHub actions (Linux) at this step - no Docker involved directly, but the whole action runs in a container, so maybe that’s related - see Install dependencies step here for logs with the errors.
On GitHub actions, the error rate seems lower, so the install eventually succeeds. Locally, it’s higher, and pnpm eventually gives up. The errors happen even when I set --network-concurrency 1
I can NOT seem to reproduce this outside of Docker on Windows locally, and my colleague with a Mac can’t reproduce even with Docker.
Node.js version
v20.18.1
Operating System
Windows
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 34
- Comments: 66 (14 by maintainers)
Commits related to this issue
- fix: pin pnpm@9.15.2 https://github.com/pnpm/pnpm/issues/8953 — committed to jsdelivr/globalping-dash-directus by MartinKolarik 2 years ago
- chore: fix pnpm version to avoid https://github.com/pnpm/pnpm/issues/8953 — committed to prisma/prisma-engines by jkomyno 2 years ago
- chore: downgrade pnpm to 9.15.2 https://github.com/pnpm/pnpm/issues/8953 — committed to xmatthias/nuxt-auth-pkce by xmatthias 2 years ago
- chore(driver-adapters): remove external wasm deps hack for napi, lift `driver-adapters` from `query-engine/..` to `libs/..` (#5115) * feat(schema-engine-wasm): created wasm-compatible schema-engine-w... — committed to prisma/prisma-engines by jkomyno 2 years ago
- Update feature-branch.yaml to pin pnpm to 9.15.2 as there is bug in github actions https://github.com/pnpm/pnpm/issues/8953 — committed to eab-agency/advance.appily.com by b00y0h 2 years ago
- Update feature-branch.yaml to pin pnpm to 9.15.2 as there is bug in github actions (#45) https://github.com/pnpm/pnpm/issues/8953 — committed to eab-agency/advance.appily.com by b00y0h 2 years ago
- Auto- Deploy by b00y0h on Fri Jan 24 19:17:44 UTC 2025 (#46) * 🚀 (production.yaml): add --print-logs option to SST deploy command for better visibility The addition of the --print-logs option to the... — committed to eab-agency/advance.appily.com by github-actions[bot] 2 years ago
- try pinning pnpm version as per https://github.com/pnpm/pnpm/issues/8953 — committed to fireproof-storage/fireproof by jchris 2 years ago
- Bugfix resolve conflicts (#54) * Auto- Deploy by b00y0h on Tue Dec 17 04:16:38 UTC 2024 (#37) * 🚀 (production.yaml): add --print-logs option to SST deploy command for better visibility The addition... — committed to eab-agency/advance.appily.com by b00y0h 2 years ago
- force merge (#56) * 🚀 (production.yaml): add --print-logs option to SST deploy command for better visibility The addition of the --print-logs option to the SST deploy command enhances the deployment... — committed to eab-agency/advance.appily.com by b00y0h 2 years ago
- try pinning pnpm version as per https://github.com/pnpm/pnpm/issues/8953 — committed to fireproof-storage/fireproof by jchris 2 years ago
- try pinning pnpm version as per https://github.com/pnpm/pnpm/issues/8953 — committed to fireproof-storage/fireproof by jchris 2 years ago
- try pinning pnpm version as per https://github.com/pnpm/pnpm/issues/8953 — committed to fireproof-storage/fireproof by jchris 2 years ago
- try pinning pnpm version as per https://github.com/pnpm/pnpm/issues/8953 — committed to fireproof-storage/fireproof by jchris 2 years ago
I have released pnpm v9.15.4. See if it helps.
Thanks @bgandy94! As @zkochan noted, this problem isn’t version specific but is very much an NPM registry rate limiting problem. The version change will change the
user-agentconfig that is assigned by default. Which means NPM doesn’t see the “problem” user-agent anymore and allows your requests.However, it’s just a matter of time before enough GitHub actions are run with that version of PNPM for the registry to rate limit that user agent too. In short, it’s a temporary fix. In a few weeks (or less), you’ll probably hit the same rate-limiting problem on
9.15.5(at least that’s been our experience since 9.15.3).I’m interested to hear if anyone else tried custom user-agents, but my team is gonna introduce that today and observe for the next few weeks… I’ll post back with what we learn.
Pinning to pnpm 9.15.2 seems to still work for those on GitHub Actions.
npm install -g pnpm@9.15.2What the hell, yeah. I have no clue what is going on here. I downgraded from 9.15.3 (latest) to 9.15.2, and suddenly it works fine. This is when running a Github action (failed build https://github.com/Aeolun/writer2/actions/runs/12747332241/job/35525192191).
It’s fine after I downgrade to 9.15.2 🤷 https://github.com/Aeolun/writer2/actions/runs/12747453768/job/35525547506
Same issue
Alas, now my team and I are hitting this in GHA on
9.15.2@zkochan did this suggestion to update the user agent prove to be a lasting solution for you? (or @s01868 - since I saw you said it worked for you at the time a few weeks back) https://github.com/pnpm/pnpm/issues/8953#issuecomment-2588231111
npm support replied they that are working on this issue and asked me to let them know if it’s still happening. I personally haven’t run into this in a while, but if someone has, please post the failed CI run link here.
Same issue
Happens in github actions
Experiencing the same issue with version 9.15.2. Upgrading to 9.15.5 resolved the problem.
For anyone using pnpm/action-setup@v4, you can add this to your package.json:
Note that you should not pass a
versioninput to the github action if you’re using thepackageManagerfield or else you’ll get this error:upgrading to
9.15.4didn’t work, but customisinguser-agentas suggested here worked!It feels like a registry issue. Maybe they have configured some rate limiting by user agent and because v9.15.2 isn’t latest, it gets less requests and fails less frequently. You could also try setting custom user agents via the user-agent setting in .npmrc. For instance:
Having the same problem in my production code when installing PNPM in my Dockerfile. Reverting to 9.15.2 fixes the issue.
If you have a step that does
npm i -g pnpmin your build, change it to benpm i -g pnpm@9.15.2and it’ll work like a charm.Same issue
Okay coming back after observing for quite awhile.
TL;DR - configuring custom user agents seems to fix this entirely whenever it happens
My team has been using a small little custom GHA to create a realistic but slightly fudged the user agent:
You may want to install pnpm differently but the important element is this script:
This sets the user-agent npm uses to a realistic value but “spoofs” the pnpm version to a random semver from
0.0.0to10.50.100- a total of 50K combinations.Prior to this we’d observe rate-limiting with the default user-agent ~2 weeks (likely due to a lot of GHA using that same pnpm version). Now we haven’t hit it at all. And, if the math / trend holds, we have ~1,920 years worth of combinations before we hit it again. Hopefully by then the npm registry and GitHub have come to some modus vivendi.
Well, at least now we know that this isn’t a bug in pnpm. I did not make any fixes related to this in pnpm v9.15.5. Could anyone fix the issue by changing the user agent setting?
@wspurgin My team was also hitting this with
9.15.2, we ended up upgrading and pinning to9.15.5and that fixed it for us.Pinning to v9.15.4 also seems to have worked for us, where we’re running CI/CD via GitHub Actions
I have forked this repo to try to reproduce the issue: https://github.com/pnpm/pnpm/issues/8953#issuecomment-2587011675
But it didn’t fail for me with 9.15.3: https://github.com/zoli-forks/writer2/actions/runs/12752793272/job/35543039421
So, I have no idea what is happening. I hope it works with 9.15.4
To solve the issue, I updated the workflow to ensure the specific version 9.15.2 of pnpm is used. Here’s how I addressed the problem:
And, Replaced npx pnpm with pnpm commands
It should be possible to “downgrade” the tag via
npm dist-tag add pnpm@9.15.2 latestwithout making a new release.I don’t know if it’s possible but may I suggest a rollback of 9.15.3 until this is figured out? Our github and vercel ci/cd is now having this issue, I would prefer not to pin to 9.15.2 on all our repositories or use the mirror except as a last resort.
@sankaSanjeeva I got those errors after upgrading to
9.15.3. It can be fixed by downgrading to9.15.2, but I’m not sure if it fits in your case.