aws/aws-cdk

(core): (asset bundling message is printed to stderr)

Open

#23,092 建立於 2022年11月25日

在 GitHub 查看
 (8 留言) (0 反應) (0 負責人)TypeScript (3,530 fork)batch import
@aws-cdk/coreeffort/smallfeature-requestgood first issuep2

倉庫指標

Star
 (10,710 star)
PR 合併指標
 (平均合併 14天 11小時) (30 天內合併 68 個 PR)

描述

Describe the bug

Prior to asset bundling aws-cdk prints a message: "Bundling asset ...". This message is written to stderr despite not being an error itself. This leads to some build systems (Rush for instance) failing as they are confirming stderr in addition to the process return code.

Expected Behavior

stderr should be reserved for error messages

Current Behavior

"Bundling asset {path}" information message is printed to stderr

Reproduction Steps

  • Within a CDK application include a NodejsFunction:
const lambdaService = new nodejsLambda.NodejsFunction(this, 'dea-app-handler', {
      memorySize: 512,
      vpc,
      role: role,
      timeout: Duration.minutes(3),
      runtime: Runtime.NODEJS_16_X,
      handler: 'handler',
      entry: path.join(__dirname, '/../src/backend-api-lambda.ts'),
      depsLockFilePath: path.join(__dirname, 'pnpm-lock.yaml'),
      bundling: {
        externalModules: ['aws-sdk'],
        logLevel: LogLevel.ERROR,
      },
    });
  • Run synth and observe stderr output cdk synth 1>out 2>err

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.51.1

Framework Version

No response

Node.js Version

v16.17.0

OS

Mac OSX 12.6

Language

Typescript

Language Version

No response

Other information

No response

貢獻者指南