AWS Codebuild node version update not working

Viewed 1742

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

2 Answers

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.

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

Related