On one system I used npm adduser
and then npm publish
to create a package. I want to release another version of this package, but I'm on a different system now. When I try npm publish
it tells me that my name or password is incorrect, which is not shocking.
However, I can't figure out how to get it to where I can type my password in again. When I try either npm adduser
or npm login
, it only prompts for my Username and Email. It doesn't prompt for my password, and also tells me that my Name or password is incorrect. It suggests that I reset the password at https://npmjs.org/forgot, but I don't need to do this -- I know the new password, I just need to be prompted for it.
I've also tried removing the username from npm config
via delete username
, but it still shows up when I do npm config get
.
There also doesn't seem to be any kind of npm logout
or another way to end my auth session with npm.
What can I do to log in to npm again with my new password?
Description. Display the npm username of the currently logged-in user. If logged into a registry that provides token-based authentication, then connect to the /-/whoami registry endpoint to find the username associated with the token, and print to standard output.
just remove ~/.npmrc
where old npm configuration is saved and retry command $ npm adduser
.
see npm adduser
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With