Publishing npm publish to nexus group repo

0 votes

I'm running nexus repo manager oss3.2.1 on a local machine.

I have defined three npm repos in nexus:

  • [PUBLIC] - a proxy for public npm registry
  • [PRIVATE] - a private repository for my own packages
  • [NPM] - a group repository, allowing access to [PRIVATE] and [PUBLIC] in this order

I've added npm Bearer Token Realm in Settings/Security/Realms

I can download packages from [PUBLIC], which works as intended.

I can easily download packages from public:

.npmrc 
registry=http://localhost:8081/repository/PUBLIC
npm install react // works fine, downloads from [PUBLIC]

also can download from npm:

.npmrc 
registry=http://localhost:8081/repository/NPM
npm install react // works fine, downloads from [PUBLIC]

But can't download from private because there's no package named react

I don't want to publish to public and I can publish packages to private.

.npmrc 
registry=http://localhost:8081/repository/PRIVATE
npm publish // works fine, publishes to [PRIVATE]

The problem is I can't publish to npm:

.npmrc 
registry=http://localhost:8081/repository/NPM
npm publish // fails, should publish to [PRIVATE]
// gets HTTP 400

Here's the detailed log of the error: https://pastebin.com/5GuqNNhf

I know that I can set up different url(s) to publish packages usig publishConfig in package.json but that's just duplicating the config. Can I do this with nexus group repo?

Jun 22, 2018 in Other DevOps Questions by DragonLord999
• 8,450 points
3,364 views

1 answer to this question.

0 votes

Group cannot be published. I'll suggest you to change the URL to a URL of a hosted npm repo. Hope it helps.

answered Jun 22, 2018 by DareDev
• 6,890 points

Related Questions In Other DevOps Questions

+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,939 views
+2 votes
1 answer
0 votes
1 answer

How to get issues count based on rules in a sonar project?

There are API docs in the footer ...READ MORE

answered May 4, 2018 in Other DevOps Questions by DareDev
• 6,890 points
2,784 views
0 votes
1 answer

Unable to start apache on mac os x 10.13

I had the exact same issue when ...READ MORE

answered Jun 7, 2018 in Other DevOps Questions by DareDev
• 6,890 points
939 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP