【问题标题】:AWS CodeBuild error: Major version of alias '14.x' is not supported in runtime 'nodejs'AWS CodeBuild 错误:运行时“nodejs”不支持别名“14.x”的主要版本
【发布时间】:2022-01-09 07:35:12
【问题描述】:

我对 AWS CodeBuild 有一个令人困惑的问题。我收到以下错误:

Major version of alias '14.x' is not supported in runtime 'nodejs'

当我将 buildspec 更新为“14”时,我会获得更多关于错误的信息:

Message: Unknown runtime version named '14' of nodejs. This build image has the following versions: 10, 12

我们长期以来一直使用 12.x 使用此 CodeBuild 项目,现在需要更新到 14.x。我们更新了 buildspec 如下:

version: 0.2

phases:
  install:
    runtime-versions:
      nodejs: 14.x

  build:
    commands:
      - "npm i"
      - "npm run build"
      - "npm run db:migrate"

artifacts:
  files:
    - "all"
    - "of"
    - "our"
    - "files"

此外,我们的 CodeBuild 已经在最新版本的 CodeBuild 映像上。我什至重新构建了 CodeBuild 项目,以确保它是最新的并且仍然是相同的问题:

aws/codebuild/amazonlinux2-x86_64-standard:3.0

提前感谢您的任何建议。

【问题讨论】:

    标签: aws-codebuild


    【解决方案1】:

    谢天谢地,我们现在已经解决了这个问题!

    问题在于 CodeBuild 映像:

    aws/codebuild/amazonlinux2-x86_64-standard:3.0

    根据the available runtimes documentation,事实证明我们根本无法使用 Amazon Linux 2,我们不得不更改为“Ubuntu Standard 5”。

    我希望这对将来的人有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-04
      • 2021-06-14
      • 1970-01-01
      • 2021-05-09
      • 2023-03-03
      相关资源
      最近更新 更多