npm安装升级报错!

使用命令:npm install -g npm,报错如下

E:\vue>npm install -g npm
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: npm@10.2.5
npm ERR! notsup Not compatible with your version of node/npm: npm@10.2.5
npm ERR! notsup Required: {"node":"^18.17.0 || >=20.5.0"}
npm ERR! notsup Actual:   {"npm":"9.6.4","node":"v20.0.0"}

npm ERR! A complete log of this run can be found in: C:\Users\DELL\AppData\Local\npm-cache\_logs\2024-01-09T02_10_29_038Z-debug-0.log

改用如下命令:npm install --force -g npm

E:\vue>npm install --force -g npm
npm WARN using --force Recommended protections disabled.
npm WARN install Forcing global npm install with incompatible version 10.2.5 into node v20.0.0

removed 43 packages, and changed 90 packages in 3s

28 packages are looking for funding
  run `npm fund` for details

查看一下版本:原来版本是9.6.4,现在版本是10.2.5

E:\vue>npm -v
npm WARN cli npm v10.2.5 does not support Node.js v20.0.0. This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at https://nodejs.org/.
10.2.5

但是和当前的node版本不兼容,升级一下node

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

family20102010

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值