Reputation: 4247
I am trying to work through publishing a library component in Angular 2, and am stuck at the basic step of publishing to npm.
I have created a user in the webui, which I can login to successfully.
When I try to run npm publish
I get the error
you need to authorize this machine using npm adduser
This is where my problem is if I call npm adduser
to authorize the machine or npm login
I get the following output:
npm verb adduser before first PUT { _id: 'org.couchdb.user:xyz', npm verb adduser name: 'xyz', npm verb adduser password: 'XXXXX', npm verb adduser email: '[email protected]', npm verb adduser type: 'user', npm verb adduser
roles: [], npm verb adduser date: '2017-08-14T13:21:16.441Z' } npm verb request uri http://registry.npmjs.org/-/user/org.couchdb.user:xyz npm verb request new user, so can't send auth npm info attempt registry request try #1 at 2:21:16 PM npm verb request id 026a1cd79e30f781 npm http request PUT http://registry.npmjs.org/-/user/org.couchdb.user:xyz
So it seems the fact that I am a new user is the problem, but it is not obvious whether I just have to wait, or do something else to get past this issue.
Upvotes: 2
Views: 4266
Reputation: 4702
Manually set the registry to https://registry.npmjs.org/
using the following flag:
npm adduser --registry=https://registry.npmjs.org/
I ran into this issue when my registry had been overridden.
Upvotes: 6