Skip to content

fix(arborist): report ETARGET instead of ERESOLVE for unresolvable peer targets - #9987

Open
manzoorwanijk wants to merge 1 commit into
npm:latestfrom
manzoorwanijk:fix/eresolve-masks-etarget-peer
Open

manzoorwanijk wants to merge 1 commit into
npm:latestfrom
manzoorwanijk:fix/eresolve-masks-etarget-peer

Conversation

@manzoorwanijk

@manzoorwanijk manzoorwanijk commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

When a dependency has no matching version and another dependency peers on it, npm install failed with ERESOLVE ... Found: <pkg>@undefined instead of the real ETARGET.
The failed fetch becomes a versionless load-failure node, and #loadPeerSet treated it as a peer conflict before #pruneFailedOptional could report the load error.
Both conflict checks in #loadPeerSet now defer when the conflicting node is a load failure, so non-optional failures throw their own error and fully optional sets are pruned as usual.

References

Fixes #9979

@manzoorwanijk
manzoorwanijk marked this pull request as ready for review September 15, 2026 09:56
@manzoorwanijk
manzoorwanijk requested a review from a team as a code owner September 15, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Unresolvable dependency that is also a peer reports ERESOLVE Found: <pkg>@undefined instead of ETARGET

1 participant