emotion-js / emotion

👩‍🎤 CSS-in-JS library designed for high performance style composition
https://emotion.sh/
MIT License
17.43k stars 1.11k forks source link

Bump @emotion/server to install the latest @emotion/utils dependency #3223

Open jnous-5 opened 2 months ago

jnous-5 commented 2 months ago

Current behavior:

After updating @emotion/cache, @emotion/react, and @emotion/styled to v11.13.0, I receive the following type error. image This happens because of EmotionCache type mismatch between @emotion/cache (uses @emotion/utils@^1.4.0) and @emotion/server (uses @emotion/utils@^1.2.1).

For now, I just used yarn's resolutions to force @emotion/server to install the latest @emotion/utils.

"resolutions": {
    "@emotion/server/@emotion/utils": "^1.4.0"
}

To reproduce:

  1. Install or update @emotion/cache to v11.13.0 and @emotion/server to v11.11.0.
  2. Create a cache using createCache from @emotion/cache.
  3. Feed this cache to createEmotionServer from @emotion/server/create-instance.

Expected behavior:

It should not throw a type error.

Environment information: