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

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

相关推荐
Hilaku11 小时前
就因为package.json里少了个^号,我们公司赔了客户十万块
前端·javascript·npm
金梦人生2 天前
让 CLI 更友好:在 npm 包里同时支持“命令行传参”与“交互式对话传参”
前端·npm
ByteCraze2 天前
一文讲透 npm 包版本管理规范
前端·arcgis·npm
Dontla3 天前
npm install命令介绍
前端·npm·node.js
Airser3 天前
npm启动Taro框架报错
前端·npm·taro
xiecoding.cn3 天前
NPM下载和安装图文教程(附安装包)
npm·node.js·npm install·npm安装·npm是什么·安装npm·npm下载
龙仔CLL3 天前
微前端乾坤vue3项目使用tinymce,通过npm,yarn,pnpm包安装成功,但是引用报错无法使用
javascript·arcgis·npm
Luna-player3 天前
npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本,解决方法
前端·npm·node.js
悢七3 天前
windows npm打包无问题,但linux npm打包后部分样式缺失
linux·前端·npm
Mountain083 天前
解决 Node.js 启动报错:digital envelope routines 错误全记录
javascript·npm·node.js