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

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

相关推荐
Lovely Ruby1 天前
[前端] 封装一下 echart 6,发布到 npm
前端·npm·node.js
BD_Marathon1 天前
NPM_常见命令
前端·npm·node.js
雪域迷影1 天前
怎么将.ts文件转换成.js文件?
javascript·typescript·npm·tsc
安_1 天前
为什么 Vue 要用 npm run dev 启动
前端·vue.js·npm
暴富的Tdy2 天前
【脚手架创建 Vue3 公共组件库】
前端·npm·npm发布
BD_Marathon2 天前
【JavaWeb】NPM_简介和相关配置
前端·npm·node.js
BD_Marathon2 天前
NPM_配置的补充说明
前端·npm·node.js
soul g3 天前
npm 包发布流程
前端·npm·node.js
Y‍waiX‍‍‮‪‎⁠‌‫‎‌‫‬3 天前
【npm】从零到一基于Vite+vue3制作自己的Vue3项目基础的npm包并发布npm
前端·npm·node.js
elangyipi1233 天前
pnpm 深度解析:下一代包管理工具的原理与实践
npm·node.js