naddison36 / sol2uml

Solidity contract visualisation tool
MIT License
1.13k stars 268 forks source link

[ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined #83

Closed 0xDEnYO closed 2 years ago

0xDEnYO commented 2 years ago

I tried many different ways to call this package but I just cant get it to work and I dont know why. Just installed it and followed the instructions but I keep getting this error, regardless of what I pass on as argument.

Any clue what I am doing wrong?

image
0xged commented 2 years ago

Ditto.

engn33r commented 2 years ago

Same here. I do get an svg generated when I use an address from mainnet so the error appears only with local paths.

naddison36 commented 2 years ago

Thanks for reporting this. I'll look at it now.

naddison36 commented 2 years ago

ok, I can replicate. The workaround is to specify an output file with the -o, --outputFileName <value> option. For example

sol2uml class ./contract -o contract.svg

I'll fix setting a default output filename in the next release.

naddison36 commented 2 years ago

Alternatively, you can specify the base contract name with the -b, --baseContractNames <value> option. This will draw all the dependencies from the specified base contract and output to the same filename. For example, the following will output to MyContract.svg.

sol2uml class ./contract -b MyContract
naddison36 commented 2 years ago

this should be fixed in v2.1.1. Please reopen this issue if it's not working for you.

Thanks