- Newest
- Most votes
- Most comments
You can go through https://github.com/aws/aws-codebuild-docker-images/issues/361 this I am able to solve this using the given approach.
I came across the same issue in my CodeBuild pipeline and I can explain the frustration in finding the answer that worked for me.
According to this link (https://docs.aws.amazon.com/codebuild/latest/userguide/runtime-versions.html) it says that that Amazon Linux 2 should support NodeJs 12. But it does not give no distinction between the different version of Amazon Linux 2 images that exist.
This link (https://docs.aws.amazon.com/codebuild/latest/userguide/available-runtimes.html) cleared it up for me. I was using Amazon Linux 2 x86_84 standard:1.0, this only supports up to NodeJs 10.
The fix: Update your image to one of the following:
- Amazon Linux 2 x86_64 standard:2.0
- Amazon Linux 2 x86_64 standard:3.0
- Amazon Linux 2 AArch64 standard:1.0
- Amazon Linux 2 AArch64 standard:2.0
- Ubuntu standard:3.0
- Ubuntu standard:4.0
- Ubuntu standard:5.0
Paying attention to the Linux type when switching. In my case (I was using CDK) updating the build image from codebuild.LinuxBuildImage.AMAZON_LINUX_2 to codebuild.LinuxBuildImage.AMAZON_LINUX_2_2 made the difference. I don't know what that looks like in a .yml file but I am certain there is some syntax that will enable the build image to be changed to one of the above images. Good luck and I hope this post helps anyone else struggling with this.
Relevant content
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago