简体   繁体   English

npm 错误,代码 E401,密码错误或丢失

[英]npm Err! code E401, Incorrect or missing password

Everyone When I was trying to install node modules using npm install facing issue.当我尝试使用 npm 安装节点模块时,安装面临问题。 I removed package.lock.json file but still facing issue我删除了 package.lock.json 文件但仍然面临问题

npm ERR! npm 错误! code E401代码 E401

npm ERR. npm 错误。 Incorrect or missing password.密码不正确或丢失。

npm ERR, If you were trying to login, change your password. npm ERR,如果您尝试登录,请更改您的密码。 create an npm ERR!创建一个 npm 错误! authentication token or enable two-factor authentication then npm ERR!身份验证令牌或启用两因素身份验证然后 npm ERR! that means you likely typed your password in incorrectly.这意味着您可能输入了错误的密码。

npm ERR, Please try again: or recover your password at: npm ERR,请重试:或找回密码:

npm ERR! npm 错误! https://www.npmjs.com/forgot 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! npm ERR:如果您正在执行其他操作,那么您保存的凭据是 npm ERR! probably out of date.可能已经过时了。 To correct this please try logging in again with: npm ERR!要更正此问题,请尝试再次登录:npm ERR! npm login npm登录

npm ERR: A complete log of this run can be found in: npm ERR:此运行的完整日志可在以下位置找到:

Finally resolved my issue asper getting Incorrect password or missing Info.终于解决了我的问题,因为密码不正确或缺少信息。 This is related missing Info along with credentials or else asper authentication rules.这与缺少信息以及凭据或其他身份验证规则有关。 If you got access from some other npm related packages you must assign and give the credentials如果您从其他一些 npm 相关软件包获得访问权限,则必须分配并提供凭据

Try Deleting the package-lock.json file before running the command "npm install" after upgrading the node versions, if you have not done that.尝试在升级节点版本后运行命令“npm install”之前删除 package-lock.json 文件,如果您还没有这样做的话。

If that will not work try removing the.npmrc file in $HOME directory as mentioned in this post.如果这不起作用,请尝试删除 $HOME 目录中的 .npmrc 文件,如本文所述。 Deleting package-lock.json to Resolve Conflicts quickly 删除package-lock.json快速解决冲突

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM