React-diagrams: Module not found: Can't resolve '@emotion/core'

Created on 20 Sep 2019  路  5Comments  路  Source: projectstorm/react-diagrams

Hello,

After trying to install several versions of beta version 6 of React Diagrams, I have an error:
Module not found: Can not resolve '@ emotion / core'
Being used only in your package, why should I also install it on my project?

Thank you

Most helpful comment

Why did you close it? I have the same error with the latest version.

All 5 comments

Why did you close it? I have the same error with the latest version.

I have exact same error when trying out the documentation example.
Module not found: Can't resolve '@emotion/core' in 'C:\projects\tests\editor-tests\node_modules\@projectstorm\react-canvas-core\dist\es\entities\layer'

The documentation should be updated to include dependencies:
@emotion/core @emotion/styled

I fixed it by installing these two missing libraries.

As per the docs, you need to install these dependencies. Its even listed in the package.json as a peer-dep. It even says when you run yarn, that your peer dependency is missing. It has even been asked here in the issue tracker before several times which can be searched for this very title.

@dylanvorster care you show me exactly where in "documentation" it is written?
Oh, found it. You added in the docs:
image

And also please guide me to package.json line where you have this dependency?
https://github.com/projectstorm/react-diagrams/blob/15d70e988e88b748c1395805c28f69dded7ebfa8/package.json#L41

In addiation to
yarn add closest lodash react mathjs dagre pathfinding paths-js @emotion/core
I also needed: yarn add resize-observer-polyfill

Link: docs/getting started

Still, no dice though:
TypeError: Cannot read property 'getTotalLength' of null (anonymous function) /src/entities/label/LabelWidget.tsx:43

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nesterov-Konstantin picture Nesterov-Konstantin  路  4Comments

t-gacema picture t-gacema  路  4Comments

schecter22107 picture schecter22107  路  3Comments

affanshahid picture affanshahid  路  3Comments

shortwavedave picture shortwavedave  路  3Comments