AWS代码构建无法遍历TypeScript类型的CDK项目文件夹结构



AWS代码构建错误:lib/lambda-Stacks/cognito-triggers-Stack.ts(4,28): error TS2307: Cannot find module '../../src/types/types' or its corresponding type declarations.

期望结果:对于代码构建成功构建CDK项目和更新云形成堆栈。

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

找到这篇文章后,我将.d.ts扩展名更改为.ts,以获得最简单的解决方案。

关于使用typescript.d.ts文件进行更泛型构建的问题

相关内容

  • 没有找到相关文章

最新更新