The engine “node“ is incompatible with this module.解决方法

安装依赖库报如下异常

bash 复制代码
[2/4] Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">= 18". Got "16.14.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

手动右键删除 node_modules 文件夹,清空了 npm 缓存:

bash 复制代码
npm cache clean --force

发现还是不行。

后来在网上找到了解决方案:忽略错误。

输入命令:

bash 复制代码
yarn config set ignore-engines true

再重新安装依赖,运行项目就可以了

相关推荐
陪我一起学编程1 小时前
关于nvm与node.js
vue.js·后端·npm·node.js
前端百草阁1 天前
从npm库 Vue 组件到独立SDK:打包与 CDN 引入的最佳实践
前端·vue.js·npm
夏日米米茶1 天前
Windows系统下npm报错node-gyp configure got “gyp ERR“解决方法
前端·windows·npm
蓝胖子的多啦A梦1 天前
npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚
前端·npm·node.js
qziovv1 天前
Pnpm的使用
npm
XI锐真的烦1 天前
横向对比npm和yarn
前端·npm·node.js
飞鸟malred2 天前
vite+tailwind封装组件库
前端·react.js·npm
好运yoo3 天前
npm install的原理
前端·npm
pzpcxy5203 天前
安装VUE客户端@vue/cli报错警告npm WARN deprecated解决方法 无法将“vue”项识别为 cmdlet、函数
前端·vue.js·npm
醉书生ꦿ℘゜এ3 天前
npm error Cannot read properties of null (reading ‘matches‘)
前端·npm·node.js