emotion-js / emotion

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

@emotion/jest causes peer dependencies issues with jest 27 #2499

Open stephenh opened 3 years ago

stephenh commented 3 years ago

Current behavior:

Including @emotion/jest: ^11.3.0 and @types/jest: ^27.0.2 in a project causes peer dependency conflicts:

npm ERR! While resolving: @emotion/jest@11.3.0
npm ERR! Found: @types/jest@27.0.2
npm ERR! node_modules/@types/jest
npm ERR!   dev @types/jest@"^27.0.2" from the root project
npm ERR!   peerOptional @types/jest@"^27.0.0" from ts-jest@27.0.5
npm ERR!   node_modules/ts-jest
npm ERR!     dev ts-jest@"^27.0.5" from the root project
npm ERR!   1 more (@types/testing-library__jest-dom)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @types/jest@"^26.0.14" from @emotion/jest@11.3.0
npm ERR! node_modules/@emotion/jest
npm ERR!   @emotion/jest@"^11.3.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @types/jest@26.0.24
npm ERR! node_modules/@types/jest
npm ERR!   peerOptional @types/jest@"^26.0.14" from @emotion/jest@11.3.0
npm ERR!   node_modules/@emotion/jest
npm ERR!     @emotion/jest@"^11.3.0" from the root project

To reproduce:

npm i with this minimal package.json:


{
  "name": "emotion-issue-template",
  "version": "1.0.0",
  "description": "",
  "keywords": [],
  "main": "src/index.js",
  "dependencies": {
    "@emotion/jest": "11.3.0",
    "@types/jest": "27.0.2"
  }
}
akshayr20 commented 3 years ago

Any updated on this? We are facing similar issues

Andarist commented 3 years ago

I believe that this will be fixed by the upcoming release: https://github.com/emotion-js/emotion/pull/2495