npm错误!代码E401密码不正确或丢失。如果您试图登录,请更改密码,创建身份验证令牌

npm错误!代码E401密码不正确或丢失。如果您试图登录,请更改密码,创建身份验证令牌,npm,lerna,npm-registry,npm-config,npm-login,Npm,Lerna,Npm Registry,Npm Config,Npm Login,在我的新M1 Macbook Air上试用它之前,我在旧Macbook上试用过,它在旧机器上无缝工作,就像一个魔咒 我的 package.json 我遵循的步骤 一, npm配置集注册表“https://npm.pkg.github.com/nuvolo" npm登录--范围=@nuvolo--注册表=https://npm.pkg.github.com 用户名:git用户名 密码:PersonalAccessToken 电邮:MyEmail@Organization.com 以giton用户

在我的新M1 Macbook Air上试用它之前,我在旧Macbook上试用过,它在旧机器上无缝工作,就像一个魔咒 我的

package.json

我遵循的步骤

一,

npm配置集注册表“https://npm.pkg.github.com/nuvolo"

  • npm登录--范围=@nuvolo--注册表=https://npm.pkg.github.com

    用户名:git用户名

    密码:PersonalAccessToken

    电邮:MyEmail@Organization.com

    以giton用户名登录

    三,

    npm安装-g lerna typescript npm检查更新

    把这个问题当作

    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/gajanan/.npm/_logs/2021-04-02T05_22_22_130Z-debug.log
    
    PS:所有的命令都可以在我的旧MacBookAir上运行


    我与这个问题斗争了很长一段时间,阅读了所有相关的答案,但都不清楚。

    通过从用户/YourSystemName中删除.npmrc文件解决了这个问题。并重新安装所有安装,如npm安装-g lerna typescript npm检查更新,它可以正常工作
    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/gajanan/.npm/_logs/2021-04-02T05_22_22_130Z-debug.log