[BUG] NPM tries to install transitive dependency from incorrect registry when scope override is present #5915
Closed
2 tasks done
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I have an
.npmrc
with two registries configured:https://registry.npmjs.org/
configured for a specific scope@scope-a
I am trying to install
@scope-a/package-a
, which also has a dependency on@scope-a/package-b
.The install fails, because it tries to fetch the transitive dependency
@scope-a/package-b
from the private registry instead of the public registry configured for that scope. From the logs, it appears that some initial calls (to get available versions) are made to the correct (public) registry, but then the call to fetch the package content is made instead to the incorrect (private) registry, which doesn't have that package+version, and so the install fails.Expected Behavior
@scope-a/package-b
should be installed from the public registry.Steps To Reproduce
See above/below
Environment
The text was updated successfully, but these errors were encountered: