wavedrom / cli

CLI for WaveDrom
https://wavedrom.com
MIT License
61 stars 12 forks source link

Error when running wavefrom cli #18

Closed samdejong86 closed 2 years ago

samdejong86 commented 2 years ago

When I try to run the wavedrom cli, I get this error:

npx wavedrom-cli -i test.json -s test.svg
Unexpected token {

The file test.json is attached here: test.txt (filename changed since github doesn't like json files.

This file works in the online editor and was saved from there.

samdejong86 commented 2 years ago

I am on Ubuntu 18.04

drom commented 2 years ago

Please try again with new version

samdejong86 commented 2 years ago

Thank you for the quick response. I pulled the latest trunk, and when I ran it I get this error:

Cannot read property 'name' of undefined
drom commented 2 years ago

Did you tried npx wavedrom-cli -i test.json -s test.svg ?

BTW. What node version do you use?

samdejong86 commented 2 years ago

Yes, I tried that command.

I'm on v8.10.0 of node.

drom commented 2 years ago

Tool supports node 12+

samdejong86 commented 2 years ago

Great, it works now! Thanks!

It's rendering the multiplication dot symbol '·' as a diamond with a question mark. I assume this is due to some package I may be missing on my computer. (It does not do this with the online editor)

Also, it takes about 30s to render the image (I think a lot of that time is getting the appropriate libraries, it shows [#########.........] | .... In my application, I have a large number of json files to render for a latex document, and spending 30s on each json will greatly increase the compile time. Do you have any advice to speed this up?

Thanks again for the tip to update node. I'm not very experienced with node, so I appreciate your patience.

drom commented 2 years ago

you can install npm i wavedrom-cli localy, and then run ./node_modules/bin/wavedrom-cli fast. I have updated instruction.

samdejong86 commented 2 years ago

Great, thanks for the tip!