diagrams icon indicating copy to clipboard operation
diagrams copied to clipboard

CLI hangs on rendering flowchart diagrams, but works with sequence

Open ricpelo opened this issue 5 years ago • 5 comments

It seems to be related with #14, but it's the opposite: now diagrams CLI hangs on rendering flowchart diagrams but works with sequence.

System info

  • Ubuntu 18.04.3 LTS
  • node v8.10.0

Steps to reproduce

Install CLI

$ npm install -g diagrams

Create flowchart diagram source (input.flowchart)

cat > input.flowchart <<EOF
st=>start: Start:>http://www.google.com[blank]
e=>end:>http://www.google.com
op1=>operation: My Operation
sub1=>subroutine: My Subroutine
cond=>condition: Yes
or No?:>http://www.google.com
io=>inputoutput: catch something...
para=>parallel: parallel tasks
st->op1->cond
cond(yes)->io->e
cond(no)->para
para(path1, bottom)->sub1(right)->op1
para(path2, top)->op1
EOF

Run command to render SVG

$ diagrams flowchart input.flowchart flowchart.svg

It hangs forever.

ricpelo avatar Aug 12 '19 18:08 ricpelo

I'd just realize that the issue is in the sample input.flowchart. The following diagram source works OK as expected:

cat > input.flowchart <<EOF
st=>start: Start:>http://www.google.com[blank]
e=>end:>http://www.google.com
op1=>operation: My Operation
sub1=>subroutine: My Subroutine
cond=>condition: Yes
or No?:>http://www.google.com
io=>inputoutput: catch something...
st->op1->cond
cond(yes)->io->e
cond(no)->para
EOF

It seems to be a problem with the para nodes. After removing them from the diagram source, the issue is gone.

ricpelo avatar Aug 12 '19 20:08 ricpelo

I also have this problem. My flowchart contains para too. The version is 0.11.0.

akatsuki105 avatar Feb 25 '20 23:02 akatsuki105

Same for me, any news on this issue?

sommella avatar Mar 29 '20 20:03 sommella

@Akatsuki-py @skonvols2k Hey guys, sorry but I don't have time at the moment for looking into this. I'm a new parent at the moment and getting no sleep, nor spare time. If one of you has time to see if maybe upgrading dependencies or something helps, I can maybe make time to redeploy.

Hope you guys are having a decent time with all of the WFH.

Francois-Laberge-Bose avatar Mar 30 '20 12:03 Francois-Laberge-Bose

I've created a pull request that solves this issue by upgrading flowchart.js and making Raphael an explicit dependency. Congratulations on being a parent!

JoshuaCrestone avatar Apr 22 '20 03:04 JoshuaCrestone