ncpleslie / JS2UML

A command-line interface application to generate UML 2 Class Diagrams from ES6+ (EMCAScript 2015+) JavaScript
0 stars 0 forks source link

can't make it run, missing demo? #9

Open j2l opened 3 years ago

j2l commented 3 years ago

Hello, Here are my steps:

python3 main.py 
Traceback (most recent call last):
  File "/JS2UML/main.py", line 5, in <module>
    from src.converter.js_parser_builder import JSParserBuilder
  File "/JS2UML/src/converter/js_parser_builder.py", line 8, in <module>
    from esprima import parse as js_parse
ModuleNotFoundError: No module named 'esprima'

pip3 install esprima
Defaulting to user installation because normal site-packages is not writeable
Collecting esprima
  Downloading esprima-4.0.1.tar.gz (47 kB)
     |████████████████████████████████| 47 kB 1.4 MB/s 
Building wheels for collected packages: esprima
  Building wheel for esprima (setup.py) ... done
  Created wheel for esprima: filename=esprima-4.0.1-py3-none-any.whl size=62259 sha256=b1358513b86b5f4432a0e844c6741d9b5862f8c1e310f146b1347dede9cf38da
  Stored in directory: /home/pm/.cache/pip/wheels/e4/39/9d/e7e4b4f468664372442053816a674305e7ff288b548d250768
Successfully built esprima
Installing collected packages: esprima
Successfully installed esprima-4.0.1

python3 main.py 
Traceback (most recent call last):
  File "/JS2UML/main.py", line 7, in <module>
    from src.converter.converter import Converter
  File "/JS2UML/src/converter/converter.py", line 1, in <module>
    from graphviz import Digraph
ModuleNotFoundError: No module named 'graphviz'

pip3 install graphviz
Defaulting to user installation because normal site-packages is not writeable
Collecting graphviz
  Downloading graphviz-0.17-py3-none-any.whl (18 kB)
Installing collected packages: graphviz
Successfully installed graphviz-0.17

python3 main.py 
Traceback (most recent call last):
  File "/JS2UML/main.py", line 12, in <module>
    CommandLine(controller).cmdloop()
  File "/usr/lib/python3.9/cmd.py", line 111, in cmdloop
    readline.parse_and_bind(self.completekey+": complete")
TypeError: unsupported operand type(s) for +: 'CommandLine' and 'str'

Ubuntu 21.04, Python 3.9.5

ncpleslie commented 3 years ago

I haven't personally tested this on anything other than Windows 10.

That said, make sure you have Graphviz set as an environment variable https://stackoverflow.com/a/44005139

Alternatively, ensure you are using branch https://github.com/ncpleslie/JS2UML/tree/feature/new-pattern_factory-or-strategy