npm install ignores corporate Nexus

0

We have a corporate Nexus (3.15.2-01) NPM Repository where we publish some corporate libraries. I recently published a new one that has unfortunately the same name as another library on the public NPM repository. My Packet is uploaded and visible on our Nexus but it can be installed. npm view only shows the public one, not the corporate one. Is there a way to solve this problem without renaming the corporate library? I would expect that Nexus only look in the public NPM repository if it don't find an artifact locally but somehow it seems not to be the case.

Other corporate libraries on our Nexus are available without problem so it's not an accessibility problem.

Thanks for help

Lanz

Posted 2019-07-19T07:08:50.677

Reputation: 1

Can you share your npm view command and results (obfuscating prioritary/security related bits)? Also curious about your .npmrc. – joedragons – 2019-07-26T15:25:39.497

Answers

0

Assuming you're using a group to access the components, you should be able to put the hosted repository first in the group ordering. Result will be it'll search that, then the proxy if it can't find it in the hosted. This is spoken to here in "Add npm repositories to the Members list in the desired order".

There's no way I know of to be choosy about this ordering, so if you want some hosted first and some proxy first this answer won't help.

PS: This answer assumes you are administrating access. Otherwise you'll need to ask your NXRM administrator to do this.

joedragons

Posted 2019-07-19T07:08:50.677

Reputation: 185

Yes, I do use a group and the hosted repo is already before the proxy. But the lib is still download for the public NPM repo. As a workaround I have renamed my lib, but, npm view doesn't see it with its new name, it simply returns nothing. I guess I have some sort of configuration problem – Lanz – 2019-07-26T14:59:01.727

@Lanz Suggestion then, look at your request.log and make sure it's actually pulling from group. If it's not, then it's probably configuration if it is, may be a NXRM bug. – joedragons – 2019-07-26T15:26:28.613