0

Error on AWS Code Build: lib/lambda-Stacks/cognito-triggers-Stack.ts(4,28): error TS2307: Cannot find module '../../src/types/types' or its corresponding type declarations.

Desired Outcome: For the Code Build to build the CDK Project successfully and update the Cloud Formation Stacks.

CDK Pipeline Configuration:

this.codePipeline = new CodePipeline(this, `${environment}-pipeline-${appName}`, {
  pipelineName: `${environment}-pipeline-${appName}`,
  selfMutation: true,
  crossAccountKeys: false,
  role: this.codePipelineRole,
  synth: new ShellStep("Deployment", {
    input: CodePipelineSource.codeCommit(this.codeRepository, environment),
    installCommands: ["npm i -g npm@latest", "npm install -g aws-cdk"],
    commands: ["cd backend", "npm ci", "npm run build", "npx cdk synth"],
    primaryOutputDirectory: "backend/cdk.out",
  }),
});
Luke
  • 761
  • 1
  • 18

1 Answers1

0

After finding this article, I changed the .d.ts extension to .ts for the easiest solution.

Stack Overflow Question about more generically building with typescript.d.ts files

Luke
  • 761
  • 1
  • 18