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.

当尝试发布npm包或登出时遇到'426 Upgrade Required'错误。解决方法包括将Node版本更新到14.18.0以上,升级npm到最新,并确保使用TLS 1.2或更高版本进行连接。详细步骤包括手动设置registry为https。
最低0.47元/天 解锁文章
1731

被折叠的 条评论
为什么被折叠?



