npm publish遇到 code E426

在尝试npm publish时遇到code E426错误,通过更新npm版本和设置HTTPS镜像地址支持TLS 1.2成功解决问题。具体步骤包括强制更新npm,设置npm镜像为HTTPS,以及确保系统支持TLS 1.2。
摘要由CSDN通过智能技术生成
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm ERR! code E426
npm ERR! 426 Upgrade Required - PUT http://registry.npmjs.org/winkcli-main

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\10177\AppData\Roaming\npm-cache\_logs\2022-04-07T17_23_17_083Z-debug.log

网上查了下

解决方式:更新版本

npm install -g npm

or

npm update npm

命令时报错

npm ERR! code EEXIST
npm ERR! path C:\Program Files\nodejs\npm.cmd
npm ERR! Refusing to delete C:\Program Files\nodejs\npm.cmd: is outside C:\Program Files\nodejs\node_modules\npm and not a link
npm ERR! File exists: C:\Program Files\nodejs\npm.cmd
npm ERR! Remove the existing file and 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值