安装cnpm时警告:npm WARN deprecated request@2.88.2解决办法

这篇博客详细介绍了如何解决npm安装时遇到的问题,包括降低npm版本、设置淘宝镜像、验证配置、清除缓存以及安装和验证cnpm的过程。通过这些步骤,开发者可以更顺利地在中国境内进行npm包的安装。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

首先看问题所在

在这里插入图片描述

解决办法如下

1、首先降低npm版本

npm install npm@4.6.1 -g

2、接着使用淘宝镜像

npm config set registry https://registry.npm.taobao.org

3、然后验证一下是否成功

npm config get registry

4、再清除一下安装缓存

npm cache clean --force

5、最后安装 cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

6、使用 cnpm -v 查看是否安装成功

Microsoft Windows [版本 10.0.18363.1316]
(c) 2019 Microsoft Corporation。保留所有权利。

C:\Users\ASUS\Desktop\新建文件夹 (2)>cnpm -v
cnpm@6.1.1 (D:\nodejs\node_gobal\node_modules\cnpm\lib\parse_argv.js)
npm@6.14.11 (D:\nodejs\node_gobal\node_modules\cnpm\node_modules\npm\lib\npm.js)
node@14.6.0 (D:\nodejs\node.exe)
npminstall@3.28.0 (D:\nodejs\node_gobal\node_modules\cnpm\node_modules\npminstall\lib\index.js)
prefix=D:\nodejs\node_gobal
win32 x64 10.0.18363
registry=https://r.npm.taobao.org
C:\Users\18681\Desktop\基于springboot的宠物医院\pet_hospital_ui-master>npm install npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: '@achrinza/node-ipc@9.2.2', npm warn EBADENGINE required: { node: '8 || 10 || 12 || 14 || 16 || 17' }, npm warn EBADENGINE current: { node: 'v23.9.0', npm: '11.2.0' } npm warn EBADENGINE } npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: 'v-click-outside-x@3.7.1', npm warn EBADENGINE required: { node: '>=8.11.4', npm: '6.4.1' }, npm warn EBADENGINE current: { node: 'v23.9.0', npm: '11.2.0' } npm warn EBADENGINE } npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: 'pkcs7@0.2.3', npm warn EBADENGINE required: { npm: '^1.4.6', node: '^0.10' }, npm warn EBADENGINE current: { node: 'v23.9.0', npm: '11.2.0' } npm warn EBADENGINE } npm warn deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x. npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. npm warn deprecated tsml@1.0.1: no longer maintained npm warn deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm warn deprecated move-concurrently@1.0.1: This package is no longer supported. npm warn deprecated request
03-20
C:\Windows\System32>npm install -g @vue/cli --force npm warn using --force Recommended protections disabled. npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead. npm warn deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported npm warn deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated apollo-datasource@3.3.2: The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respectively). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm warn deprecated apollo-server-errors@3.3.1: The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now end-of-life (as of October 22nd 2023 and October 22nd 2024, respec
03-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

水星记_

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

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

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

打赏作者

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

抵扣说明:

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

余额充值