The engine "node" is incompatible with this module. Expected version XXX
执行 “yarn install” 报如下错误,错误表示node版本不一致:
error css-loader@1.0.1: The engine "node" is incompatible with this module. Expected version ">= 6.9.0 <7.0.0 || >= 8.9.0". Got "8.1.2"
方案1:
卸载旧版Node.js,去官网下载并重新安装指定版本区间的Node.js后重新执行命令成功:
忘记Node.js安装位置的可以执行where node进行查看:
方案2:
忽略错误后重新yarn install
yarn config set ignore-engines true