gpt4 book ai didi

javascript - npm 错误!代码 E401 npm 错误!密码错误或丢失

转载 作者:行者123 更新时间:2023-12-05 00:23:55 27 4
gpt4 key购买 nike

我的 Node 版本是 10.15.0,NPM 版本是 6.8.4
升级后运行 npm install
npm 到 14.16.0 和 npm 到 7.6.2
收到此错误 -

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 ERR! A complete log of this run can be found in:
npm ERR! /Users/xyz/.npm/_logs/2021-04-15T18_55_07_993Z-debug.log

最佳答案

  • 尝试在升级 Node 版本后运行命令“npm install”之前删除 package-lock.json 文件,如果您还没有这样做的话。
  • 如果这不起作用,请尝试删除 $HOME 目录中的 .npmrc 文件,如本文所述。

  • NPM ERR Code E401: Unable to authenticate, need: Bearer authorization
    注意 - 如本文所述,删除 package-lock.json 可能有其自身的问题,因此请使用此解决方案,除非您找到更好的解决方案。
    Deleting `package-lock.json` to Resolve Conflicts quickly

    关于javascript - npm 错误!代码 E401 npm 错误!密码错误或丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67114659/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com