-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When pointing to --cdk-output with CDKv2 it throws an UnhandledPromiseRejectionWarning #74
Comments
Same here: I was trying to create a diagram for a stack based on CDK 2.3.0. The error message I get is
In the cdk.out directory I have
|
you might workaround with something like |
The same for me. From what I noticed you can just do |
Sorry for the very late attention on this. Can you please try to see if the latest release (1.1.34) fixes this. Leaving this open until I get thumbs up. Have tested with this CDK project and was able to reproduce the error and verified that the fix worked. |
Still getting this issue, just updated to the latest build. I was using CDK pipelines. I temporarily commented the pipeline and directly put my stack in the /bin file, then it worked. Obviously this is not ideal because it means altering CDK (and what it's going to deploy) in order to generate a diagram. It's a CDK pipeline that deploys 2 lambdas (a simple hello world and goodbye world) in 2 accounts, each in 2 regions. When I run the rool I get a similar error as above. After cdk synth I was able to give the template path from the various folders the cdk.out folder |
@RachelleJanssen do you have a link to the project's repo? |
Command: cfn-dia draw.io --cdk-output cdk.out --output-file $(sed "s/values/diagrams/g;s/.json/.drawio/g" <<< values/david-test.json) --ci-mode --skip-synth
Log:
[creatediagram] (node:73636) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'cdk.out/WAF-DAVID-INT-KY4K140S.assets.template.json' [creatediagram] at Object.openSync (fs.js:498:3) [creatediagram] at Object.readFileSync (fs.js:394:35) [creatediagram] at fromCDK (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/shared/templateParser.js:95:30) [creatediagram] at Object.get (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/shared/templateParser.js:31:16) [creatediagram] at Object.generate (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/graph/MxGenerator.js:243:41) [creatediagram] at Command.<anonymous> (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/commands/draw.io/index.js:37:23) [creatediagram] at Command.listener [as _actionHandler] (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/node_modules/commander/index.js:922:31) [creatediagram] at Command._parseCommand (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/node_modules/commander/index.js:1503:14) [creatediagram] at Command._dispatchSubcommand (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/node_modules/commander/index.js:1443:18) [creatediagram] at Command._parseCommand (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/node_modules/commander/index.js:1460:12) [creatediagram] (Use
node --trace-warnings ...to show where the warning was created) [creatediagram] (node:73636) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) [creatediagram] (node:73636) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The text was updated successfully, but these errors were encountered: