Peer Dependencies updated for React 17
See original GitHub issueCurrent behavior:
I’m getting errors when doing an “npm install” in my project that appear to be associated with @emotion/react
.
I get this in my terminal:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! react@"^17.0.0" from the root project
npm ERR! peer react@">=16.8.0" from @emotion/react@11.4.0
npm ERR! node_modules/@emotion/react
npm ERR! @emotion/react@"^11.4.0" from the root project
npm ERR! @emotion/react@"^11.1.1" from react-select@4.3.0
npm ERR! node_modules/react-select
npm ERR! react-select@"^4.2.0" from the root project
npm ERR! 24 more (@fortawesome/react-fontawesome, @react-pdf/renderer, ...)
To reproduce:
I deleted my package-lock.json and node_modules folder and than ran “npm i”.
Expected behavior:
All my packages install without issues.
Environment information:
React 17.0.2 @emotion/react 11.4.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Widen peer dependency range to include React 17 · Issue #814
@foaadnami the error is saying that there's a peer dependency conflict, because you've installed React 17 but next-auth currently requires React ...
Read more >How can I get React styleguidist to install correctly and get ...
The issue is caused by npm 7's exciting new feature that automatically installs peer dependencies. This results in both React 16 ...
Read more >npm Peer Dependencies - Fathom
Towards a deeper understanding of peer dependencies in npm. ... with React 17 and is optimistically expected to work with future minor updates...
Read more >You must install peer dependencies warning during npm install
For example - some peer dependencies require react 16.0.8 but when I ... get warnings from other peer dependencies which requires react 17.x ......
Read more >you must install peer dependencies yourself Code Example
npm WARN codelyzer@6.0.1 requires a peer of tslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. typescript by devops ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, it’s not due to Emotion. react-pdf is the reason why you encount npm dependency errror. @mdodge-ecgrow
react-pdf -> @react-pdf/renderer@1.6.16 -> react-reconciler@“^0.24.0” -> peer react@“^16.0.0”
“^0.24.0” === “0.24.0” <- this is the key.
https://cdn.jsdelivr.net/npm/react-reconciler@0.26.0/package.json v0.26.0 is the first version which support react@17. My suggestion is report your issue to react-pdf org repo.
Thank you