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,380 points
686 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,810 points

Related Questions In Other DevOps Questions

0 votes
1 answer

Use vagrant to update $PATH of guest vm

Just try the below script: mvm.vm.provision :shell, :inline ...READ MORE

answered May 1, 2018 in Other DevOps Questions by shubham
• 6,870 points
55 views
0 votes
1 answer

Copy log files to local machines using Jenkins

Try initializing the variables with values according ...READ MORE

answered May 2, 2018 in Other DevOps Questions by ajs3033
• 7,240 points
39 views
+1 vote
2 answers

Unable to build TFS project because files not found

Please make a folder in solution Nd ...READ MORE

answered May 16 in Other DevOps Questions by Shashikesh Mishra
348 views
0 votes
1 answer

Unable to create BlueMix DevOps services account

Jazzhub is shut now. try https://console.bluemix.net/devops/getting-started. It's ...READ MORE

answered May 28, 2018 in Other DevOps Questions by ajs3033
• 7,240 points
28 views
+13 votes
2 answers
0 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,810 points
219 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,810 points
38 views