Unable to publish to npm registry, 401 error
I created an account in npm (https://www.npmjs.com/). Then created a token in that account.
The following command worked for me:
npm adduser --registry=https://registry.npmjs.org/:_authToken=<token-from-npm>