Here is my buildspec.yml file used by codebuild:
version: 0.2
env:
shell: bash
phases:
install:
runtime-versions:
nodejs: 14
pre_build:
commands:
- echo Installing source NPM dependencies...
- npm install -g aws-cdk
- npm install -g typescript
- npm install
- npm run build
build:
commands:
- cdk --version
- cdk ls
- cdk synth
post_build:
/usr/local/bin/cdk -> /usr/local/lib/node_modules/aws-cdk/bin/cdk npm WARN notsup Unsupported engine for aws-cdk@2.9.0: wanted: {"node":">= 14.15.0"} (current: {"node":"12.22.2","npm":"6.14.13"}) npm WARN notsup Not compatible with your version of node/npm: aws-cdk@2.9.0
Finally, cdk ls fails
Appreciate any help as I have already tried removing node-modules and package-lock.json.