Skip to content

fix(corp-mirrors): resolve @pnpm from npmjs registry - #120

Merged
hakula139 merged 1 commit into
mainfrom
fix/pnpm-corp-mirror
Jul 18, 2026
Merged

fix(corp-mirrors): resolve @pnpm from npmjs registry#120
hakula139 merged 1 commit into
mainfrom
fix/pnpm-corp-mirror

Conversation

@hakula139

Copy link
Copy Markdown
Owner

Summary

  • Scope only the @pnpm package to the npmjs registry so pnpm's package-manager self-install resolves canonically, while every other install keeps flowing through the corp artifactory mirror.

Why

pnpm 11 hardened its package-manager self-install: when a repo pins packageManager (e.g. pnpm@10.23.0), pnpm fetches it as @pnpm/exe and asserts an integrity-only resolution. The artifactory npm mirror rewrites the tarball host to its own domain, so the resolution carries a tarball field alongside integrity and the assertion throws. The result is that every pnpm invocation in such a repo fails with:

The packageManager dependency "@pnpm/exe@10.23.0" in pnpm-lock.yaml must use a registry package path and an integrity-only resolution

This is not the pnpm version, the pin format, or manage-package-manager-versions. Each variable was isolated to confirm the sole trigger is the mirror's rewritten tarball host. Pinning the @pnpm scope to npmjs makes the package manager resolve from the canonical registry, where the resolution is integrity-only and the assertion passes.

Test plan

  • nixos-rebuild switch --flake .#wsl applies cleanly
  • pnpm --version in a repo pinning packageManager returns the pinned version instead of erroring
  • pnpm install, pnpm lint, and a Dockerfile pnpm build all run
  • Non-@pnpm installs still resolve through the artifactory mirror
pnpm 11 asserts an integrity-only resolution for the pinned packageManager
(fetched as @pnpm/exe) during self-install. The artifactory npm mirror
rewrites the tarball host to its own domain, leaving a tarball field
alongside integrity, so the assertion throws and every pnpm invocation in
a repo with a packageManager pin fails. Scope only @pnpm to npmjs so the
package manager resolves canonically while other installs keep the mirror.
@hakula139 hakula139 self-assigned this Jul 17, 2026
@hakula139 hakula139 added the bug Something isn't working label Jul 17, 2026
@hakula139
hakula139 merged commit 01aa5b9 into main Jul 18, 2026
14 checks passed
@hakula139
hakula139 deleted the fix/pnpm-corp-mirror branch July 18, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

1 participant