ljacobsson / cfn-diagram

CLI tool to visualise CloudFormation/SAM/CDK stacks as visjs networks, draw.io or ascii-art diagrams.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unresolved promise error when running in WSL

tobilg opened this issue · comments

commented

When trying to generate HTML output, I see the following error with version 1.1.2:

cfn-dia html -t .serverless/cloudformation-template-update-stack.json -o docs/stack.drawio

(node:2662) UnhandledPromiseRejectionWarning: Error: spawn wslvar ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:2662) 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: 1)
(node:2662) [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.
commented

After installing https://github.com/wslutilities/wslu the problem disappeared. Seems to be the unsolved issue of sindresorhus/open#198.

Maybe add a remark in the README? I can close the ticket if you like, it's not caused by cfn-dia.

Thanks for investigating this.

Let's leave this open and I'll update the readme when I get a chance.

Glad it works now 👍

Have added this info to the 'known issues' section of the readme.

Closing

commented

Thanks a lot @ljacobsson!