cfn-diagram
cfn-diagram copied to clipboard
template.app Undefined
Tried installing tool on Mac M1 and running it against the sample template here.
Got a stack trace back. Tried again using amd64 platform via Node docker image and got same exact result:
docker run -it --platform linux/amd64 -v $(pwd):/workspace node /bin/bash
root@147c82ee9cab:/# npm i -g @mhlabs/cfn-diagram
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: Package no longer supported. Use at your own risk
added 212 packages, and audited 213 packages in 32s
54 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm notice
npm notice New minor version of npm available! 8.13.2 -> 8.15.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.15.0
npm notice Run npm install -g [email protected] to update!
npm notice
root@147c82ee9cab:/# cfn-dia draw.io -t workspace/template.json
/usr/local/lib/node_modules/@mhlabs/cfn-diagram/shared/templateParser.js:30
if (template.app) {
^
TypeError: Cannot read properties of undefined (reading 'app')
at Object.get (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/shared/templateParser.js:30:16)
at Object.generate (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/graph/MxGenerator.js:243:41)
at Command.<anonymous> (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/commands/draw.io/index.js:37:23)
at Command.listener [as _actionHandler] (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/node_modules/commander/index.js:922:31)
at Command._parseCommand (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/node_modules/commander/index.js:1503:14)
at Command._dispatchSubcommand (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/node_modules/commander/index.js:1443:18)
at Command._parseCommand (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/node_modules/commander/index.js:1460:12)
at Command.parse (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/node_modules/commander/index.js:1292:10)
at Object.<anonymous> (/usr/local/lib/node_modules/@mhlabs/cfn-diagram/index.js:10:9)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
Node.js v18.6.0