Skip to content

aws-cdk-examples/typescript/codepipeline-build-deploy: cdk synth fails (codeRepo undefined) #1173

@jaysonmc

Description

@jaysonmc

Describe the bug

Mark down instructions say to run cdk synth. However, the code for codeCommit (where codeRepo) was defined is commented out.

Note: I recall this was fixed and worked previously. Not sure if a previous commit undid code changes that introduced GitHub compatibility.

Expected Behavior

I expected cdk synth to not break.

Current Behavior

cdk synth errors out:

/mnt/c/Users/jaysosmc/Documents/Tech/TFC/BEX/samples/aws-cdk-examples/typescript/codepipeline-build-deploy/node_modules/ts-node/src/index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
lib/codepipeline-build-deploy-stack.ts:101:57 - error TS2304: Cannot find name 'codeRepo'.

101 source: codebuild.Source.codeCommit({ repository: codeRepo }),
~~~~~~~~
lib/codepipeline-build-deploy-stack.ts:120:57 - error TS2304: Cannot find name 'codeRepo'.

120 source: codebuild.Source.codeCommit({ repository: codeRepo }),
~~~~~

Reproduction Steps

Run cdk synth from aws-cdk-examples/typescript/codepipeline-build-deploy

Possible Solution

Either:

  1. Fix the code issue (undefined variable), or;
  2. Update the README on missing configuration to use a non-CodeCommit repository as source.

Additional Information/Context

No response

CDK CLI Version

2.1007.0

Framework Version

No response

Node.js Version

v18.20.8

OS

Linux YVR-1801553842 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Language

Typescript

Language Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions