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

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

相关推荐
学渣y5 天前
nvm下载node版本,npm -v查看版本报错
前端·npm·node.js
你的电影很有趣5 天前
lesson71:Node.js与npm基础全攻略:2025年最新特性与实战指南
前端·npm·node.js
有梦想的攻城狮6 天前
从0开始学vue:npm命令详解
前端·vue.js·npm
星光不问赶路人6 天前
理解 package.json imports:一次配置,跨环境自由切换
前端·npm·node.js
向下的大树6 天前
npm 最新镜像,命令导致下载错误
前端·npm·node.js
迪丽热爱7 天前
解决【npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本。】问题
前端·npm·node.js
weixin_456904278 天前
前端开发时npm install报错解决方案
前端·npm·node.js
蓝莓味的口香糖8 天前
【npm】npm命令大全
前端·npm·node.js
源去_云走9 天前
npm 包构建与发布
前端·npm·node.js
码农欧文9 天前
关于npm和pnpm
前端·npm·node.js