We've setup a recommended setting which contains a npm_hosted
for private packages, a npm_proxy
for public ones, and a npm_group
to group the two, just as the setting shown in https://blog.sonatype.com/using-nexus-3-as-your-repository-part-2-npm-packages.
It works fine until we come with this:
Suppose there's a package a
in public npmjs.com, and a package of the same name in our private repo, which, however, has nothing to do with the public one, now I do npm i a
, what I expect is installing the private a
package, however what is actually installed is the public one.
I tried again with npm i a@1.0.0
, and this time the private one is installed.
I checked the public a
package, and found that it has no version 1.0.0
. So I think nexus is resolving a package like, resolving the semver range against all versions across both packages from the 2 repos.
It is a trouble for me, because I don't want to rename my package just because there's a package of the same name out there which I don't care about at all.
How do I make it resolve to the private a
package as long as there's an a
package in my private repo?