npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

"npm dist-tag add" fails with 401 for PUT

It also prints an notice that all tokens have been invalidated. But I’ve run npm login before and npm whoami returns my username.


I had to disable 2FA to do npm dist-tag add, otherwise it doesn’t allow me to proceed.


FYI: you need to use --otp <otp code> with npm dist-tag