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",
}),
});