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

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

相关推荐
whale fall3 小时前
npm install安装的node_modules是什么
前端·npm·node.js
做梦都在学习前端7 小时前
发布一个monaco-editor 汉化包
前端·npm·vite
墨菲安全2 天前
NPM组件 betsson 等窃取主机敏感信息
前端·npm·node.js·软件供应链安全·主机信息窃取·npm组件投毒
聪聪的学习笔记3 天前
【1】确认安装 Node.js 和 npm版本号
前端·npm·node.js
whale fall3 天前
npm install安装不成功(node:32388)怎么解决?
前端·npm·node.js
Gazer_S4 天前
【公司环境下发布个人NPM包完整教程】
前端·npm·node.js
溪i4 天前
pnpm 升级
npm
你喜欢喝可乐吗?4 天前
Windows 安装 nodejs npm
前端·npm·node.js
come112344 天前
npm 命令入门指南(前端小白版)
前端·npm·node.js
墨菲安全4 天前
NPM组件 alan-baileys 等窃取主机敏感信息
前端·npm·node.js·npm组件·恶意包·主机信息窃取