3

Trying to upgrade an existing React app running on AWS Amplify from node v16 to v18
The image used is the provided Amazon Linux 2

Expected it to install node 18 on the machine it spun up and build the application, since this is the LTS version

Here is the error I get in the build process:

2022-11-15T19:19:02.924Z [WARNING]: node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version GLIBC_2.28' not found (required by node)
Sahar LaOr
  • 43
  • 1
  • 6

3 Answers3

3

The same problem happened to me, I fixed it by adding a custom image in the build config.

You can see the steps to add a custom image in the following link

The image that worked for me was the following:

public.ecr.aws/t7o4u3y2/node-18.2.0:latest

  • If I change the image I get the following error: "aws codecommit credential-helper $@ get: 1: aws: not found" How did you manage to clone the repository? – A.Infante Mar 20 '23 at 19:01
1

Thanks for opening this issue. Amazon Linux 2 doesn't support the right GLIBC version at the moment, we're coordinating internally to get that updated. As @saharl-neosec mentions, you can provide a custom docker image until we fully support it:

https://github.com/aws-amplify/amplify-hosting/issues/3109

Prinzhorn
  • 22,120
  • 7
  • 61
  • 65
0

Amazon Linux 2 includes Glibc 2.26 or under. To use a higher glibc version, you need to consider other AMI, for example Amazon Linux 2022 (al2022-ami) as it includes glibc 2.34.

You can also revert back to Node.js 16 as it uses a lower version of Glibc.

Eric Ly
  • 2,095
  • 1
  • 20
  • 27