projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.73k stars 1.18k forks source link

Module not found: Can't resolve '@emotion/core' #438

Closed KyDenZ closed 5 years ago

KyDenZ commented 5 years ago

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

StarpTech commented 4 years ago

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

avilde commented 4 years ago

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.

dylanvorster commented 4 years ago

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.

avilde commented 4 years ago

@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

ajthinking commented 4 years ago

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:


(anonymous function)
/src/entities/label/LabelWidget.tsx:43```
baloukaulrich6 commented 3 years ago

Échec de la compilation ./node_modules/@material-ui/styled-engine/index.js Module not found: Can't resolve '@emotion/react' in 'C:\Users\balou\bleasy-shop\node_modules\@material-ui\styled-engine' comment corriger cette erreur je n'arrive plus a compiler

Leshe4ka commented 3 years ago

Échec de la compilation ./node_modules/@material-ui/styled-engine/index.js Module not found: Can't resolve '@emotion/react' in 'C:\Users\balou\bleasy-shop\node_modules@material-ui\styled-engine' comment corriger cette erreur je n'arrive plus a compiler

I had the similar issue, when i try to configure @mui v.5 with JSS

./node_modules/@mui/system/node_modules/@mui/styled-engine/index.js
Module not found: Can't resolve '@emotion/react' in '/Users/username/Documents/workProjects/project/project-ui/node_modules/@mui/system/node_modules/@mui/styled-engine'