I use d3@5. Use this example https://bl.ocks.org/tomshanley/a434d47dc7ff983c764ccc555e89e295
import * as d3Sankey from 'd3-sankey-circular';
const sankey = d3Sankey
.sankeyCircular()
.nodeId(d => d.name)
.nodeAlign(d3Sankey.sankeyJustify)
.nodeWidth(12)
.nodePadding(15)
.nodePaddingRatio(0.5)
.iterations(32)
.size([width, height])
const sankeyData = sankey(data);
data
{
nodes: [
{name: 'new'},
{name: 'confirmed'},
....
],
links: [
{target: 'new', source: 'confirmed', value: 10},
.....
]
}
And sankeyData not generated, but throw the error

johnson.js

And if i change nodeId to d => d.index (instead d => d.name) this error disappears and another appears

