1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
Hello.
Try specifying the runtime version in your buildspec.yaml.
https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-syntax
version: 0.2
phases:
install:
runtime-versions:
nodejs: 18
commands:
- echo Installing NPM dependencies
- npm install
# pre_build:
# commands:
# - echo Installing NPM dependencies
# - npm install
build:
commands:
- echo Build started on date
- npm run build
post_build:
commands:
# copy the contents of /build to S3 - aws s3 cp --recursive ./build s3://******/
- aws cloudfront create-invalidation --distribution-id E***** --paths /*
artifacts:
files:
- '**/*'
base-directory: build
