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

Gokul P P
  • 962
  • 8
  • 27

2 Answers2

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.

Bofei Cao
  • 221
  • 1
  • 5
3

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

Brad
  • 15,186
  • 11
  • 60
  • 74