节点在构建期间抛出不受支持的引擎错误,但实际节点版本大于要求
Node throws unsupported engine error during build, but actual node version is greated than required
我在 CI 中遇到不受支持的节点版本,该版本从 Docker 映像运行
Triggering build execution...
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm
npm ERR! notsup Not compatible with your version of node/npm
npm ERR! notsup Required: {"node":">=16.13.0"}
npm ERR! notsup Actual: {"npm":"7.18.1","node":"v16.4.2"}
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-26T20_58_56_716Z-debug.log
Error occured during the build.
请注意,实际版本 16.4.2
> 16.13.0
,所以应该不会出现此错误?
因为严格模式开启 engine-strict=true
,所以我确实使用 stderr 退出了此程序,但无论哪种方式都会发生错误。
(本地没有问题,我也是运行节点16)
看来你看错了版本号。 13 > 4.
来自https://nodejs.org/en/download/releases/:
Node.js 16.4.2 2021-07-05
Node.js 16.13.0 2021-10-26
我在 CI 中遇到不受支持的节点版本,该版本从 Docker 映像运行
Triggering build execution...
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm
npm ERR! notsup Not compatible with your version of node/npm
npm ERR! notsup Required: {"node":">=16.13.0"}
npm ERR! notsup Actual: {"npm":"7.18.1","node":"v16.4.2"}
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-26T20_58_56_716Z-debug.log
Error occured during the build.
请注意,实际版本 16.4.2
> 16.13.0
,所以应该不会出现此错误?
因为严格模式开启 engine-strict=true
,所以我确实使用 stderr 退出了此程序,但无论哪种方式都会发生错误。
(本地没有问题,我也是运行节点16)
看来你看错了版本号。 13 > 4.
来自https://nodejs.org/en/download/releases/:
Node.js 16.4.2 2021-07-05
Node.js 16.13.0 2021-10-26