解决使用yarn安装依赖出现“The engine "node" is incompatible with this module. Expected version "^14.18.0 || ^16.14.0 || >=18.0.0". Got "17.9.0"”的问题

发布时间 2023-06-07 14:08:48作者: Qubernet

1、问题描述

某天在使用yarn安装依赖的时候,突然出现如下错误导致安装依赖终止:

The engine "node" is incompatible with this module. Expected version "^14.18.0 || ^16.14.0 || >=18.0.0". Got "17.9.0"

image


2、解决办法

使用如下命令忽略错误:

yarn config set ignore-engines true

image

然后再使用yarn进行安装即可,如下图所示即安装成功:

image