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

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

相关推荐
Flynt10 小时前
axios 被投毒半年后,我把 npm 的"安全防线"实测了一遍:最信任的 SHA512 是安慰剂
前端·npm·node.js
天若有情6731 天前
POT规范|一套个人自研NPM包本地生命周期管理体系
npm·包管理·前端工程化·个人开源·工程规范·pot规范
kiracrimson3 天前
npm 入门:包管理器、依赖与 npx
前端·npm·node.js
迪幻4 天前
封装自己的 npm 依赖并存储到个人 GitHub
前端·npm·github
LRL_8 天前
跨平台 Node 模块安装指南:如何利用 pnpm/npm 配置`supportedArchitectures` 锁定平台依赖
前端·npm·node.js
guslegend10 天前
脚手架原理与本地调试:从 bin 软链接到 npm link
前端·npm·node.js·脚手架·前端工程化
孟陬12 天前
#教程 dw, dm, dy, d18m 是何意?万物可 Badge | 定制漂亮精致小徽章,打造眼前一亮 README
npm·github
hasty15 天前
不上传新包,也能改变用户拿到的版本:npm dist-tag 的 OIDC 权限治理
前端·npm·node.js
玖石书17 天前
HiSH 通过 apk 安装 Node.js、npm 与 pnpm
npm·node.js·鸿蒙·hish
FACELESS VOID17 天前
wsl下使用npm,错误识别到了windows下的npm
linux·windows·npm