TypeError: Cannot set property 'order' of undefined
Not sure if you have any interest in this. I am cross posting this from the main dagre repo. Basically I have a graph that when laid out throws the following error:
TypeError: Cannot set property 'order' of undefined
at ./node_modules/dagre-layout/dist/dagre-layout.core.js:1:16798
at arrayEach (./node_modules/dagre-layout/node_modules/lodash/lodash.js:508:11)
at Function.forEach (./node_modules/dagre-layout/node_modules/lodash/lodash.js:9334:14)
at./node_modules/dagre-layout/dist/dagre-layout.core.js:1:16759
at arrayEach (./node_modules/dagre-layout/node_modules/lodash/lodash.js:508:11)
at Function.forEach (.source/node_modules/dagre-layout/node_modules/lodash/lodash.js:9334:14)
at v (./node_modules/dagre-layout/dist/dagre-layout.core.js:1:16727)
at t.default (./node_modules/dagre-layout/dist/dagre-layout.core.js:1:17145)
at ./node_modules/dagre-layout/dist/dagre-layout.core.js:1:30614
at w (./dagre-layout/dist/dagre-layout.core.js:1:3619)
I was able to replicate this, in this fork also. Here is the relevant gist.
https://gist.github.com/mmacfadden/2c923a6c7209308745296d489289f316
Here is the Dagre issue: https://github.com/dagrejs/dagre/issues/234
Can you reproduce the issue here: https://mermaidjs.github.io/mermaid-live-editor/ ?
If so, please post the link back and I will definitely take a look.
+1 here. Would having too many nodes and edges be the reason? My data had 1k+ nodes..
@tylerlong I will try to reproduce it there. @frozenL I was able to reproduce it in a graph with about 15 nodes.
Can you reproduce the issue here: https://mermaidjs.github.io/mermaid-live-editor/ ?
If so, please post the link back and I will definitely take a look.
Are you using dagre for any of these diagrams? I tried copying the reproducer from @mmacfadden but no luck https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggTFJcbiAgIGEtLT5kXG4gICBiLS0-ZVxuICAgYy0tPmZcbiAgIGMtLT5nXG4gICAgc3ViZ3JhcGggb25lXG4gICAgICAgYVxuICAgICAgIGJcbiAgICBlbmRcbiAgICBzdWJncmFwaCB0d29cbiAgICAgICAgY1xuICAgIGVuZFxuICAgIHN1YmdyYXBoIHRocmVlXG4gICAgICAgIGRcbiAgICBlbmRcbiAgICBzdWJncmFwaCBmb3VyXG4gICAgICAgIGVcbiAgICAgICAgZlxuICAgICAgICBnXG4gICAgZW5kXG4gICAgc3ViZ3JhcGggZml2ZVxuICAgICAgICBoLS0-aVxuICAgIGVuZFxuICAgIHN1YmdyYXBoIHNpeFxuICAgICAgICBqLS0-a1xuICAgIGVuZFxuICAgIHN1YmdyYXBoIHNldmVuXG4gICAgICAgIGxcbiAgICBlbmRcbiAgICBzdWJncmFwaCBlaWdodFxuICAgICAgICBtLS0-blxuICAgICAgICBuLS0-b1xuICAgIGVuZFxuIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0
Of course, the same reproducer work (as is, it fails equally) if used with dagre-layout instead of dagre
@josejulio I was using dagre itself and was able to reproduce directly in dagre. I cross posted the issue over here since some development was going on in this port as well.