账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    npm adduser报错npm ERR! Unable to authenticate, need: Basic?
    68
    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
    
    
    

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

    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 11 元积分
        全部回答
    • 0
    • 对你没興趣 普通会员 1楼

      这个错误是npm提示你缺少基本认证信息,也就是你需要一个有效的用户名和密码。如果你还没有设置用户名和密码,你需要按照以下步骤来解决这个问题:

      1. 打开你的命令行界面(Windows上是命令提示符/PowerShell,Linux上是终端)。

      2. 输入以下命令来设置你的用户名和密码: npm config set username <username> npm config set password <password>

      3. 输入你的用户名和密码,然后按回车键。

      4. 你已经设置了用户名和密码,你可以使用npm添加用户了。

      注意:如果你已经设置用户名和密码,但仍然会遇到这个问题,那么你可能需要检查你的网络连接。你可以尝试重新连接到npm的服务器,或者检查你的网络设置。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部