AWS Amplify 部署node版本18报错修复

Amplify env:Amazon Linux:2

Build Error : Specified Node 18 but GLIBC_2.27 or GLIBC_2.28 not found on build

一、原因

报错原因是因为默认情况下,AWS Amplify 使用 Amazon Linux:2 作为其构建镜像,并自带 GLIBC 2.26。不过,构建需要 Node.js 18 的前端应用程序将需要 GLIBC 2.27 或 2.28。

二、解决

  • 网上搜了一圈,大多数推荐的方法

    1. Amplify 对应项目 -> App settings -> Build settings -> Build image settings -> Edit build image settings -> Build image -> 粘贴进输入框
    bash 复制代码
     public.ecr.aws/docker/library/node:18.17.0
  • 如图所示,这种配置下,楼主并没有解决报错。 console 里依旧报错:

    bash 复制代码
    node 18 is not avaliable

    最后解决方案:

  • 设置 node verison 为 18.13.0, Build Image 使用默认 Amazon Linux:2 即可 。 如图:

    原因可以看到github里amplify的贡献者的评论有写到,默认 docker 镜像里已经默认pin好了 node v18.13.0,用户可以直接使用。

  • 参考🔗:

AWS Amplify - Specified Node 18 but GLIBC_2.27 or GLIBC_2.28 not found on build

Amplify-github-issues-3109

相关推荐
翼龙云_cloud9 天前
亚马逊云代理商:GPT-6 Astra 上线 Amazon Bedrock API 调用与企业集成实操
云计算·aws·gpt-6 astra
上海英方软件股份有限公司9 天前
什么是 VMware Cloud on AWS 灾难恢复
云计算·vmware·虚拟化·aws·容灾·灾难恢复·云灾备
yunlaodacom11 天前
AWS亚马逊云服务代理商:EC2和S3为什么建议放在同一Region?跨Region流量费和网络成本怎么规划
网络·云计算·aws
科技每日热闻11 天前
AWS Activate云积分可以用于哪些云服务和AI开发场景?
人工智能·ai·云计算·aws
2501_9304724412 天前
深度复盘|数据库迁移实战(上):腾讯云助手解析慢查询日志,定位索引缺失与语法不兼容
数据库·阿里云·ffmpeg·云计算·腾讯云·aws
万象新讯12 天前
申请 AWS Activate 的初创企业要满足什么条件,需准备哪些资料?
大数据·人工智能·aws
商业看点解说12 天前
AWS Activate除了提供云积分,还能为初创企业提供哪些技术和生态资源?
aws
johnny23313 天前
云计算AWS:服务简介与实战
aws
zhojiew14 天前
让 Agent 安全地“借用别人的钥匙“:AgentCore 上用 Authentik 打通 OAuth 出站的一次实战
安全·ai·aws·agentcore
2601_9622986715 天前
AWS推ADOP:用AI Agent把数据工程从周压缩到小时
ai·自动化·agent·aws·数据工程