Closed ghost closed 3 years ago
You probably will have to add those two dependencies: ml-matrix
and @emotion/react
(or @emotion/core
? Not sure =p).
ml-matrix
has been removed, but no version has been released ever since. That's why you still need it.
I was able to fix it. There were further bugs to fix afterwards. I would like to note that it can only be a temporary solution. This package should be updated as well. Now here the steps.
npm install @projectstorm/react-diagrams@next
Make sure to add ml-matrix
because it is needed in the current build. Also include @emotion
in version 10 because they renamed @emotion/core
to @emotion/react
in the latest verison 11.
npm install closest lodash react dagre pathfinding paths-js resize-observer-polyfill ml-matrix @emotion/core@10.1.1 @emotion/styled@10.0.3
TypeError: Cannot read property 'getTotalLength' of null
or TypeError: path is null
As mentioned in #598 you have to do the following.
<React.StrictMode>
tags from src/index.tsx
canvas
class to <CanvasWidget engine={engine} className='canvas' />
src/index.css
.canvas {
height: 100vh;
}
I hit the same problem. The workaround solves the problem for now
releasing a new version of the lib now that matches the docs
After installation as described in the documentation I got the following errors.
Module not found: Can't resolve 'ml-matrix' I think this package should not be a dependency anymore but Point.js still requires it (../node_modules/@projectstorm/geometry/dist/es/Point.js). See also #763
Module not found: Can't resolve '@emotion/react' It seems that @emotion/core has been renamed to @emotion/react.
How do I get this fixed? Thanks for the help!