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

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

相关推荐
HugeYLH5 小时前
解决npm问题:错误的代理设置
前端·npm·node.js
爱吃南瓜的北瓜1 天前
npm install 卡在“sill idealTree buildDeps“
前端·npm·node.js
TTc_1 天前
记录首次安装远古时代所需的运行环境成功npm install --save-dev node-sass
前端·npm·sass
翻滚吧键盘1 天前
npm使用了代理,但是代理软件已经关闭导致创建失败
前端·npm·node.js
bubusa~>_<2 天前
解决npm install 出现error,比如:ERR_SSL_CIPHER_OPERATION_FAILED
前端·npm·node.js
天下皆白_唯我独黑2 天前
npm 安装扩展遇到证书失效解决方案
前端·npm·node.js
~欸嘿2 天前
Could not download npm for node v14.21.3(nvm无法下载节点v14.21.3的npm)
前端·npm·node.js
^^为欢几何^^2 天前
npm、pnpm和yarn有什么区别
前端·npm·node.js
懒羊羊我小弟2 天前
常用 Webpack Plugin 汇总
前端·webpack·npm·node.js·yarn
小白探索世界欧耶!~3 天前
npm/pnpm软链接
前端·npm·node.js