Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript npm错误!代码E401 npm错误!密码不正确或丢失_Javascript_Node.js_Npm - Fatal编程技术网

Javascript npm错误!代码E401 npm错误!密码不正确或丢失

Javascript npm错误!代码E401 npm错误!密码不正确或丢失,javascript,node.js,npm,Javascript,Node.js,Npm,我的节点版本是10.15.0,NPM版本是6.8.4 在升级后运行npm安装时 净现值至14.16.0,净现值至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 a

我的节点版本是10.15.0,NPM版本是6.8.4 在升级后运行npm安装时 净现值至14.16.0,净现值至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
  • 如果尚未执行此操作,请在升级节点版本后运行命令“npm install”之前尝试删除package-lock.json文件

  • 如果这不起作用,请尝试删除$HOME目录中的.npmrc文件,如本文所述


  • 是的,我完全错过了。删除package-lock.json对我来说很有效。谢谢