You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LinuxBuildImage.AMAZON_LINUX_2_ARM_2 is the build image used for the CodePipeline pipelines CDK_Synth & Application_Build. This image includes Node 10.24.1 & Node 12.22.2 (please see the Dockerfile) but not Node 14, as is required in the README and the pipeline build fails.
This causes the CDK Synth step to fail because of an unsupported language feature (the ?? operator) being used in the code. The code should probably use another image which provides the required Node version.
The text was updated successfully, but these errors were encountered:
I have manually built the AL2 image from commit 206fa376d3cd3420b28c52c0517d1da0e895e01f of the Dockerfile following the instructions outlined in its README and have been able to replicate the problem. Here's the output of the npm run cdk synth command:
bash-4.2# npm run cdk synth
> [email protected] cdk /root/aws-cross-account-cicd-pipeline
> cdk "synth"
/root/aws-cross-account-cicd-pipeline/node_modules/aws-cdk/lib/index.js:12413
home = path.join((os.userInfo().homedir ?? os.homedir()).trim(), ".cdk");
^
SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/root/aws-cross-account-cicd-pipeline/node_modules/aws-cdk/bin/cdk.js:3:15)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] cdk: `cdk "synth"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] cdk script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-11-16T10_56_53_808Z-debug.log
LinuxBuildImage.AMAZON_LINUX_2_ARM_2
is the build image used for the CodePipeline pipelinesCDK_Synth
&Application_Build
. This image includes Node 10.24.1 & Node 12.22.2 (please see the Dockerfile) but not Node 14, as is required in the README and the pipeline build fails.This causes the CDK Synth step to fail because of an unsupported language feature (the
??
operator) being used in the code. The code should probably use another image which provides the required Node version.The text was updated successfully, but these errors were encountered: