AWS Codebuild node version update not working
Asked Answered
L

3

5

I am getting an error while deploying my site

Minimum Node version not met :(

You are using Node v12.22.2. We require Node >=14 or up!

tried updating buildspec.yaml file with node update commands npm install -g node, Buildspec.yaml

Leatheroid answered 5/11, 2021 at 10:10 Comment(3)
Can you show the contents of the buildspec file?Ramer
file added in the questionLeatheroid
Did you try using nodejs: latest instead of nodejs: 14.15.1 Also, nodejs version is a child node of runtime-versions:. Hope it is correctly set.Ramer
F
4

Try running n 14.18.3.

The n package is pre-installed on (at least some) CodeBuild runtimes which you can use to install another version and select among installed versions.

Details here.

Fiden answered 19/1, 2022 at 19:47 Comment(0)
A
4

The default AWS linux container used by CodeBuild only supports nodejs version 12.x, so change it to the ubuntu image aws/codebuild/standard:5.0 that supports node version 14.x

See AWS Available Runtimes for nodejs

Amery answered 15/8, 2022 at 1:17 Comment(0)
P
0

It seems that you have spaces in your runtime-versions, it looks like runtime - versions instead of runtime-versions, could it be just this?

Pascia answered 22/11, 2023 at 17:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.