emotion
emotion copied to clipboard
@emotion/jest causes peer dependencies issues with jest 27
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/[email protected]
npm ERR! Found: @types/[email protected]
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 [email protected]
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/[email protected]
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/[email protected]
npm ERR! node_modules/@types/jest
npm ERR! peerOptional @types/jest@"^26.0.14" from @emotion/[email protected]
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"
}
}
Any updated on this? We are facing similar issues
I believe that this will be fixed by the upcoming release: https://github.com/emotion-js/emotion/pull/2495