【发布时间】:2022-02-03 14:20:15
【问题描述】:
我想在我的 typescript npm 项目中的 sigma.js 中绘制曲线箭头。以下发生在浏览器/客户端:
Uncaught TypeError: Cannot read properties of undefined (reading 'process')
at Sigma.process (bundle.js:5088:42)
at new Sigma (bundle.js:4656:15)
at Object.complete (bundle.js:6434:17)
at l.parseChunk (bundle.js:1964:6719)
at l._chunkLoaded (bundle.js:1964:8287)
at XMLHttpRequest.<anonymous>
我只是将边缘类型从“箭头”更改为“曲线箭头”,但没有奏效。我需要将任何特定的curdArrow.js 文件导入我的npm 项目吗?
graph.addEdge(parent_node, child_node, {
size: 1,
color: '#d6d6d6',
type: "curvedArrow"
});
package.json 中的当前依赖项:
"dependencies": {
"@types/sigmajs": "^1.0.28",
"commonjs": "^0.0.1",
"express": "^4.17.2",
"fs": "^0.0.1-security",
"graphology": "^0.23.2",
"graphology-components": "^1.5.2",
"graphology-layout": "^0.5.0",
"graphology-layout-forceatlas2": "^0.8.1",
"papaparse": "^5.3.1",
"path": "^0.12.7",
"sigma": "^2.1.3",
"xhr": "^2.6.0"
}
【问题讨论】:
标签: typescript npm sigma.js