The engine "node" is incompatible with this module. Expected version ">=8.9". Got "6.11.2" error Found incompatible module.

背景

用jenkins配置vue前端代码部署,要执行yarn install && yarn build:dev 命令。配置了构建脚本后运行jenkins发现报错

[1/5] Validating package.json...
error ruoyi@2.2.0: The engine "node" is incompatible with this module. Expected version ">=8.9". Got "6.11.2"
error Found incompatible module.

解决

线上通常做法是要设置服务器yarn的配置,这样确实是可以的。

yarn config set ignore-engines true

但是本质上是因为node版本太低了。所以为了一步到位,最好安装版本大于8.9的的jenkins容器 node插件

原文地址:https://www.cnblogs.com/qingshan-tang/p/13035348.html