bakunin95 / wavi

Web Application Viewer - generate class diagram for web application
Other
145 stars 23 forks source link

Error in graphvizClass null #3

Closed stevage closed 8 years ago

stevage commented 9 years ago
$ node `which wavi` --svg src out.svg
finished HTML analysis...
can't parse src/Views/CatalogItemInfo.html::script>1: { [Error: Line 2: Unexpected token <]
  index: 5,
  lineNumber: 2,
  column: 5,
  description: 'Unexpected token <' }
can't parse src/Views/DataCatalogTab.html::script>2: { [Error: Line 3: Unexpected token <]
  index: 58,
  lineNumber: 3,
  column: 9,
  description: 'Unexpected token <' }
can't parse src/Views/SearchTab.html::script>3: { [Error: Line 3: Unexpected token <]
  index: 58,
  lineNumber: 3,
  column: 9,
  description: 'Unexpected token <' }
finished js analysis...
finished misc analysis...
update element ids...
generating graph (could take several minutes)...
Error in graphvizClass null

$ which dot
/usr/bin/dot

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/graphviz

Have I installed GraphViz incorrectly perhaps? The instructions are a little unclear on how to install it.

This is Ubuntu Trusty 64.

bakunin95 commented 9 years ago

The unexpected token could be the use of jsx, i havent tested it yet. But what it means is that those 3 scripts tag won't be taken into account in the graph because the character "<" break the code.

As for the error, its my fault, i think it was a console.log that i forgot when i was debuging last week, was out.svg created ?

stevage commented 9 years ago

No, there's no output file (same with --png etc).

The failed parsing isn't really a problem yet, but just for info, the files that fail start like this:

<script type="text/html" id="catalog">
    <tr>

That is, they're HTML snippets rather than full HTML documents.

bakunin95 commented 9 years ago

Ok, i tested it on ubuntu 14.10 not trusty. Id recommend using graphviz 3.38, the problem must be the ubuntu trusty using an old graphviz with different parameters. Also im not using dot, im using sfdp and if it fails it tries with circo. I know that sfdp in 14.04 did not work for me because they did not add the triangulation library in that version.