Skip to content
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

Can't export logic circuit diagram as PNG #26

Open
jochemarends opened this issue Feb 6, 2024 · 0 comments
Open

Can't export logic circuit diagram as PNG #26

jochemarends opened this issue Feb 6, 2024 · 0 comments

Comments

@jochemarends
Copy link

When trying to convert the following JSON file as PNG using wavedrom-cli -i test.json -p test.png I get the errors I've pasted below:

{ assign:[
  ["out",
    ["|",
      ["&", ["~", "a"], "b"],
      ["&", ["~", "b"], "a"]
    ]
  ]
]}
/usr/local/lib/node_modules/wavedrom-cli/node_modules/svg2img/index.js:64
            imgBuffer = pngData.asPng();
                                ^

TypeError: Cannot read properties of undefined (reading 'asPng')
    at /usr/local/lib/node_modules/wavedrom-cli/node_modules/svg2img/index.js:64:33
    at loadSVGContent (/usr/local/lib/node_modules/wavedrom-cli/node_modules/svg2img/index.js:75:9)
    at svg2img (/usr/local/lib/node_modules/wavedrom-cli/node_modules/svg2img/index.js:24:5)
    at /usr/local/lib/node_modules/wavedrom-cli/wavedrom-cli.js:47:7
    at /usr/local/lib/node_modules/wavedrom-cli/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3)

I've tested on both WSL and Windows using version 3.1.1 of wavedrom-cli. On WSL I've tested with the versions 12, 19, and 20 of node. On Windows I've only tested using version 20 of node. When exporting as SVG everything works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant