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

安装依赖库报如下异常

bash 复制代码
[2/4] Fetching packages...
error marked@11.1.0: 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

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

相关推荐
一只大马猴呀10 小时前
Windows 安装使用 nvm,Node.js、npm多版本管理、切换
前端·npm·node.js
铅笔侠_小龙虾1 天前
pnpm 完全指南
npm·web
Patrick_Wilson2 天前
你删过 lock 文件吗?聊聊包管理器迁移中 90% 的人会踩的坑
javascript·npm·前端工程化
En^_^Joy2 天前
Node.js开发指南:模块、npm与Webpack
webpack·npm·node.js
无巧不成书02183 天前
Windows PowerShell执行策略详解:从npm报错到完美解决
前端·windows·npm·powershell执行策略·执行策略·npm.ps1·脚本报错
Luna-player4 天前
npm install vue-awesome-swiper@5.0.1 swiper@7.4.1安装后,我又想全删了,怎么移除
前端·vue.js·npm
军哥全栈AI6 天前
Windows11 彻底卸载Node.js(无残留,适配所有版本)
npm·node.js
❀͜͡傀儡师7 天前
通过npm 手动安装、Docker 部署 OpenClaw小龙虾
前端·docker·npm
头发多多程序媛7 天前
解决依赖下载报错,npm ERR! code EPERM
前端·npm·node.js
console.log('npc')8 天前
pnpm使用
前端·npm