0

npm adduser 输入完邮箱然后回车 报错

npm ERR! code EAUTHUNKNOWN
npm ERR! Unable to authenticate, need: Basic

npm adduser 输入完邮箱然后回车

npm -v 版本6.4.1
看之前有人说换一个邮箱,也不行,还是报这个错误
也多人说把npm切换到6.9.0版本,报了另一个错误
说密码不正确
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR!     https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR!     npm login

相关代码

$ npm adduser
Username: moon
Password: 111111
Email: (this IS public) zjwzjw1122@126.com
npm ERR! code EAUTHUNKNOWN
npm ERR! Unable to authenticate, need: Basic


有哪位大神指导指导!!!!!

2 个回答
1

已采纳

我同样报这个错,是因为我的username以前被注册过,我自己不记得了,现在换了个邮箱用同一个username来注册,就会出现这个提示。这种情况可以去提示里https://www.npmjs.com/forgot 输入用户名,会接受到验证邮件。由于我之前注册的邮箱,是上一个公司的企业邮箱,所以没法这样找回,就换了个username重新注册

0

解决了,到时候整理成文章吧,太多坑。心好累,一下午都在搞这个。

撰写答案

推广链接