When `npm login` with the correct account and password, why still get the" Wrong username or password "?

I can’t use my username and password pair to run npm login success in the terminal, but

I use a couple of accounts and a password to log in to npmjs.com. But when executing npm login in the terminal, this error appeared:

 npm WARN adduser Incorrect username or password npm WARN adduser You can reset your account by visiting: npm WARN adduser 
+5
source share
1 answer

View npm configuration via npm config ls , check registry

 β†’ npm config ls ; cli configs user-agent = "npm/2.14.2 node/v4.0.0 darwin x64" ; userconfig /Users/xxx/.npmrc email = " xxx@xx.com " registry = "https://registry.npm.taobao.org/" 

If you use a third-party registry, for example, "taobao.org", etc., you will receive the error message "Invalid username or password."

Decision

Replace temporarily to use npmjs.org official registry:

npm config set registry https://registry.npmjs.org/

+14
source

Source: https://habr.com/ru/post/1234000/


All Articles