【发布时间】:2022-06-17 10:28:12
【问题描述】:
有没有人遇到过 Codebuild 的节点 14 的最新版本是 14.19.2 但 EC2 支持的节点 14 的最新版本是 14.19.1。
由于 Codebuild 不支持指定次要版本,我一直坚持使用 14.19.2 进行构建,然后在构建完成后无法部署,因为 EC2 中的节点版本不匹配。
来自 Codebuild 的日志:
> [Container] 2022/05/21 14:21:15 Running command echo "Installing
> Node.js version 14 ..." Installing Node.js version 14 ...
>
> [Container] 2022/05/21 14:21:15 Running command n $NODE_14_VERSION
> copying : node/14.19.2 installed : v14.19.2 (with npm 6.14.17)
从部署到 EC2 的日志:
[1/5] Validating package.json...
2022-05-21T06:53:18.834-07:00 error my-app@0.1.2: The engine "node" is incompatible with this module. Expected version "14.19.1". Got "14.19.2"
2022-05-21T06:53:18.834-07:00 error Found incompatible module.
【问题讨论】:
标签: node.js aws-codepipeline aws-codebuild