报错信息:
npm ERR! code E500
npm ERR! 500 Internal Server Error - PUT https://registry.npm.taobao.org/-/user/org.couchdb.user:xxx
解决方法:
不是账号密码问题,只是需要删除本地的~/.npmrc文件,然后使用npm adduser,实际原因应该是你在 .npmrc 中配置了 registry,登录时必须切回 npm.js 的源
sudo rm .npmrc
用npm adduser登录,logged in就代表登录成功了
Logged in as xxx on https://registry.npmjs.org/.
如果还不成功
1,配置npm包地址
npm config set registry https://registry.npmjs.org/
2,检查地址
curl https://registry.npmjs.org/
3,清楚npm缓存
npm cache clean --force
最后再用npm adduser登录即可
查看是否已经登录,执行npm who am i即可:
npm who am i