projectstorm / react-diagrams

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

The `@emotion/core` package has been renamed to `@emotion/react` #783

Open alexkalinins opened 3 years ago

alexkalinins commented 3 years ago

Hello, I was following the documentation getting started demo. I installed all the peer dependencies. When I ran it, it showed me Module not found: Can't resolve '@emotion/react'. After installing @emotion/react, I got an error that: The '@emotion/core' package has been renamed to '@emotion/react'.

Apparently in Emotion 11, @emotion/core was renamed to @emotion/react, but since no version was specified when installing in yarn, @emotion/styled depends on @emotion/react.

phakhee commented 3 years ago

Same problem here.

axelmarciano commented 3 years ago

React-diagrams doesn't support the last version of emotion. To fix it i've just edited my package.json like this: ... "@emotion/core": "~10.0.0", "@emotion/styled": "~10.0.0", ...

I think we can update the documentation on the peer dependencies section to indicate the recommanded versions of peer-dependencies.

phakhee commented 3 years ago

Yeah what I did was just install the versions I saw in the package.json of the latest commit. Works now, thanks!

jagadeesh93 commented 3 years ago

@axelmarciano Hii Sir I am also this in my react project . It was working fine for the past one week all of a sudden it started giving me this issue When i install packages using yarn the app works fine. But when i install it using npm it will give me an error like Module not found: Can't resolve '@emotion/react' Few weeks before it was working fine with yarn and npm. I am using Node 12