npm i 安装报错 (node 版本问题)

PS D:\qieyin-main-frontend\huwen> npm i
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'upath@1.0.4',
npm WARN EBADENGINE   required: { node: '>=4 <=9' },
npm WARN EBADENGINE   current: { node: 'v14.18.3', npm: '8.3.1' }
npm WARN EBADENGINE }
npm WARN deprecated babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated extract-text-webpack-plugin@2.1.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated set-value@2.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated html-webpack-plugin@2.30.1: out of support
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN tarball tarball data for file-saver@https://registry.npmjs.org/file-saver/-/file-saver-1.3.3.tgz (sha1-5oowx8sETi+zYrQoRp/rKRwuCdg=) seems to be corrupted. Trying again.
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over 
as this distribution is no longer supported and may contain bugs and critical security issues.   
npm WARN deprecated webpack-hot-middleware@2.22.0: Accidentally doesn't hot reload if warnings are seen
npm WARN deprecated mixin-deep@1.3.1: Critical bug fixed in v2.0.1, please upgrade to the latest 
version.
npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should 
use the URLSearchParams API instead.
npm WARN deprecated flatten@1.0.2: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated domelementtype@1.3.0: update to domelementtype@1.3.1
npm WARN deprecated request@2.81.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@4.2.1: this library is no longer supported
npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated set-value@0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated source-map-resolve@0.5.1: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN tarball tarball data for file-saver@https://registry.npmjs.org/file-saver/-/file-saver-1.3.3.tgz (sha1-5oowx8sETi+zYrQoRp/rKRwuCdg=) seems to be corrupted. Trying again.
npm WARN deprecated chokidar@2.0.3: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated uuid@3.2.1: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over 
as this distribution is no longer supported and may contain bugs and critical security issues.   
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request@2.79.0: request has been deprecated, see https://github.com/request/rnpm WARN deprecated tar@2.2.1: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated axios@0.15.3: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated har-validator@2.0.6: this library is no longer supported
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!     
npm WARN deprecated svgo@0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x.     
npm WARN deprecated buffer@4.9.1: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
npm WARN deprecated core-js@2.5.5: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your 
dependencies to the actual version of core-js.
npm ERR! code EINTEGRITY
npm ERR! sha1-5oowx8sETi+zYrQoRp/rKRwuCdg= integrity checksum failed when using sha1: wanted sha1-5oowx8sETi+zYrQoRp/rKRwuCdg= but got sha512-2lGfU4gymmhXRUiPLeQlnlkMaSY8azJB9W8e/vFp44AlAOEvzf6XiBUoTHO9NBM4OVlehybxDM9B4SwLBh42mw== sha1-zdTETTqiZOrC9o7BZbx5HDSvEjI=. (10271 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Admin\AppData\Local\npm-cache\_logs\2022-02-14T08_41_59_018Z-debug-0.log   

会有一段

 这样的代码  required 是要求的node 版本   current 是 当前的配置 

根据需求改就可 然后 npm cache verify  清除缓存  npm i 安装  如果安装时失败 就使用cnpm i 安装

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 当npm出现ENOENT错误时,通常是由于找不到文件引起的。可能是路径不正确,需要确保在项目的根路径下运行命令,例如vue的启动命令一般是npm run dev / npm run serve,而react的启动命令是npm start。另外,也可能是因为安装版本不匹配,可以尝试安装对应版本的插件。如果是安装其他包时出现错误,可能是安装版本太高与当前项目不匹配。123 #### 引用[.reference_title] - *1* [Vue脚手架报错npm ERR! code ENOENTnpm ERR! syscall opennpm ERR!](https://blog.csdn.net/weixin_56035334/article/details/125265069)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item] - *2* [【 npm ERR! code ENOENT npm ERR! syscall open npm ERR!项目运行报错问题】](https://blog.csdn.net/m0_45991266/article/details/131060804)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item] - *3* [npm install 报错(npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path D:\node.js\odejs)](https://blog.csdn.net/weixin_56661658/article/details/128512027)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值