Skip to content

flowchart: TypeError: Cannot set property 'next' of undefined #1595

Closed
@CharlesChen0823

Description

@CharlesChen0823

I use flowchart to generate a flow, but return an error : cannot set property 'next' of undefined. But when i used the web http://flowchart.js.org/ to generate a flow using same code, it works fine.
my code is

st=>start: Start
op1=>operation: L;
                sid;
                bid;
                amount;
                A;
                B;
                C;
cond1=>condition: yes or no
op2=>operation: Benchbark:
                D(sid,bid) += amount;
cond2=>condition: D(sid,bid)<amount
op3=>operation: Benckbark:
                B += amount;
                D(sid,bid) -= amount;
op4=>operation: Benchbark:
                B += D(sid,bid);
                amount -= D(sid, bid);
                D(sid, bid) = 0;
cond3=>condition: L < amount
op5=>operation: Benchbark:
                A += amount;
                L -= amount;
op6=>operation: Benchbark1:
                A += L;
                amount -= L;
                L = 0;
                Benchbark2:
                C += amount;
e=>end: End
st->op1->cond1(no)->op2->e
cond1(yes)->cond2(no)->op3->e
cond2(yes)->op4->cond3(no)->op5->e
cond3(yes)->op6->e

Activity

shd101wyy

shd101wyy commented on May 22, 2018

@shd101wyy
Owner

@CharlesChen0823 Oh I think it is because the flowchart that we are using right now (v1.7.0) is out of date. We will upgrade it to the newest version (v1.11.0) in next release. Thank you!.

If you can't wait, you could manually replace the file in node_modules/mume/dependencies/flowchart/flowchart.js to the newest one.

For atom, it is at ~/.atom/packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/dependencies/flowchart/flowchart.js

Thank you

CharlesChen0823

CharlesChen0823 commented on May 23, 2018

@CharlesChen0823
Author

Thank you

82p

82p commented on May 23, 2018

@82p

for VS Code, you can find at

~\.vscode\extensions\shd101wyy.markdown-preview-enhanced-0.3.5\node_modules\@shd101wyy\mume\dependencies\flowchart/flowchart.js

knightwupz

knightwupz commented on Jun 11, 2019

@knightwupz

Hello shd101wyy:

I have encountered this problem too, but after I replace the local flowchart.js (~.vscode\extensions\shd101wyy.markdown-preview-enhanced-0.4.1\node_modules@shd101wyy\mume\dependencies\flowchart\flowchart.min.js) with the newest one, the error still comes, the error message is:

TypeError: Cannot set property 'next' of undefined

I am using win10, VSCodeUserSetup-x64-1.34.0, Markdown Preview Enhanced 0.4.1.

What should i do next?

ionescu77

ionescu77 commented on May 10, 2021

@ionescu77

flow - doesn't work

  • flowchart.js does not work

@knightwupz
I also encounter the same Issue, with atom. Did you manage to solve it?

Included with atom is flowchart.js.min (v1.11.3).

Downloaded the latest flowchart.js.min (v1.14.1) but it still doesn't work :(

Screenshot 2021-05-10 at 10 38 38

I also found this issues related to flowchart.js

adrai/flowchart.js#27

But they seem related to how people format their <div>'s when using flowchart.js directly in their projects.

sequence - works

Thankfully it works:

Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!

Mermaid - works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @shd101wyy@ionescu77@knightwupz@82p@CharlesChen0823

        Issue actions

          flowchart: TypeError: Cannot set property 'next' of undefined · Issue #1595 · shd101wyy/vscode-markdown-preview-enhanced