其他分享
首页 > 其他分享> > npm 报错 426 Upgrade Required

npm 报错 426 Upgrade Required

作者:互联网

ERR! 426 Upgrade Required

解决方法

更新 node 版本到 14.18.0 以上,可以参考:https://www.jianshu.com/p/e6d3f7110a60

然后升级 npm 的版本到最新

npm install -g npm@latest
npm config set registry https://registry.npmjs.org/

下面是详细的英文描述及原因

When I try to publish a new package to npm or try to logout, I get the following error message:

npm ERR! code E426
npm ERR! 426 Upgrade Required

在这里插入图片描述

原因:2021年10月4日后,npm 网站和 npm registry 必须使用 TLS 安全套接层 1.2 版本,所以需要升级对应版本

Beginning October 4, 2021, all connections to npm websites and the npm registry—including for package installation—must use TLS 1.2 or higher.

Source

What I did:

In my case, I had to manually set the registry to use https instead of http as well:


(0) When using nvm, that’s what you need to do:

nvm install 14.18.0
nvm use 14.18.0
nvm alias default 14.18.0

参考链接

https://stackoverflow.com/questions/69448082/err-426-upgrade-required-when-i-interact-with-the-npm-registry

标签:npm,Required,报错,registry,https,nvm,14.18,426
来源: https://blog.csdn.net/weixin_41697143/article/details/120650358