Conversation
zkochan
added a commit
that referenced
this pull request
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ERR_PNPM_FETCH_404whenpnpm install --frozen-lockfileruns against a project whose dependency uses afile:tarball (#11407).toLockfileResolutionwas dropping thetarballfield for any resolution whenlockfile-include-tarball-url=false(the default). Forfile:and git-hosted tarballs the URL cannot be reconstructed from package name + version + registry, so installs against the resulting lockfile fell back to the npm registry and 404'd. The check carried over from a v10 PR that was already reverted on the v10 branch but never propagated to v11.pkgSnapshotToResolutionso lockfiles already written by v11.0.0–v11.0.2 (which lost theirfile:tarball field) still install — the tarball is rebuilt from the depPath'snonSemverVersion.lockfileIncludeTarballUrl=falseexclusion behavior for standard and non-standard registry URLs is preserved.Test plan
pnpm --filter @pnpm/lockfile.utils test— all 9 unit tests pass, including new coverage forfile:, git-hosted, and registry tarballs intoLockfileResolution, plus the recovery path inpkgSnapshotToResolution."test-package": "file:test-package-1.0.0.tgz"installs cleanly with the rebuilt bundle, both for fresh install and for--frozen-lockfileagainst a lockfile missing thetarballfield.exclude tarball URL when lockfileIncludeTarballUrl is falseandexclude non-standard tarball URL when lockfileIncludeTarballUrl is falsetests ininstalling/deps-installer/test/lockfile.tsstill pass.