The problem is that according to the package.json -file, the library requires ngraph.forcelayout to be of the version ^1.2.0, so by default it installs aforementioned package of the version 1.2.0. Version 1.2.0 of ngraph.forcelayout though doesnt split functions that calculate the node mass into defaultArrayNodeMass and defaultSetNodeMass. Instead, there is only one function called defaultNodeMass. That function cant calculate the length of the set links properly because it refers to the length-attribute, not to the size. Therefore, e.g. in my case by executing the function createLayout, which is provided by ngraph.offline.layout-library I receive the following error: Error: Node mass should be a number. I assume that this issue can be neutralized by updating the version of ngraph.forcelayout at the package.json to the one, where this function is able to calculate the size of the set properly.
The problem is that according to the
package.json-file, the library requiresngraph.forcelayoutto be of the version^1.2.0, so by default it installs aforementioned package of the version1.2.0. Version1.2.0ofngraph.forcelayoutthough doesnt split functions that calculate the node mass intodefaultArrayNodeMassanddefaultSetNodeMass. Instead, there is only one function calleddefaultNodeMass. That function cant calculate the length of the setlinksproperly because it refers to thelength-attribute, not to thesize. Therefore, e.g. in my case by executing the functioncreateLayout, which is provided byngraph.offline.layout-library I receive the following error:Error: Node mass should be a number. I assume that this issue can be neutralized by updating the version ofngraph.forcelayoutat the package.json to the one, where this function is able to calculate the size of the set properly.