Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update React Version to 18+ #46

Open
rnkdsh opened this issue Jun 25, 2022 · 4 comments
Open

Update React Version to 18+ #46

rnkdsh opened this issue Jun 25, 2022 · 4 comments
Assignees

Comments

@rnkdsh
Copy link

rnkdsh commented Jun 25, 2022

Build is failing in React 18 because of older version of React in this repository

npm ERR! While resolving: @coreui/icons-react@2.0.1
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"~18.2.0" from the root project
npm ERR!   peer react@">=17" from @coreui/react@4.2.3
npm ERR!   node_modules/@coreui/react
npm ERR!     @coreui/react@"^4.2.3" from the root project
npm ERR!   18 more (@coreui/react-pro, @emotion/react, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^[17](https://github.com/Trademanza/Trademanza-Admin-KYC/runs/7055269253?check_suite_focus=true#step:3:18)" from @coreui/icons-react@2.0.1
npm ERR! node_modules/@coreui/icons-react
npm ERR!   @coreui/icons-react@"^2.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@17.0.2
npm ERR! node_modules/react
npm ERR!   peer react@"^17" from @coreui/icons-react@2.0.1
npm ERR!   node_modules/@coreui/icons-react
npm ERR!     @coreui/icons-react@"^2.0.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/runner/.npm/eresolve-report.txt for a full report.
@Gribesh
Copy link

Gribesh commented Jun 30, 2022

Facing same issue while installing icons-react on react@18.2.0 as

npm install @coreui/icons
npm install @coreui/icons-react

Error as follow:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: app@0.1.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17" from @coreui/icons-react@2.0.1
npm ERR! node_modules/@coreui/icons-react
npm ERR!   @coreui/icons-react@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /.npm/_logs/2022-06-30T16_35_22_108Z-debug-0.log

@Aymensbc
Copy link

Im also facing this issue
PS C:\Users\aymen\Desktop\nextwebsite> npm install @coreui/icons-react
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: nextwebsite@0.1.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! react@"18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17" from @coreui/icons-react@2.0.1
npm ERR! node_modules/@coreui/icons-react
npm ERR! @coreui/icons-react@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!

@rldw
Copy link

rldw commented Aug 3, 2022

Our build pipeline is failing as well. Any quick fix for this?

npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @coreui/icons-react@2.0.1
npm ERR! Found: react@18.1.0
npm ERR! node_modules/react
npm ERR!   react@"^18.1.0" from the root project
npm ERR!   peer react@">=17" from @coreui/react@4.2.2
npm ERR!   node_modules/@coreui/react
npm ERR!     @coreui/react@"^4.2.2" from the root project
npm ERR!   8 more (@testing-library/react, react-dom, react-redux, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17" from @coreui/icons-react@2.0.1
npm ERR! node_modules/@coreui/icons-react
npm ERR!   @coreui/icons-react@"^2.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@17.0.2
npm ERR! node_modules/react
npm ERR!   peer react@"^17" from @coreui/icons-react@2.0.1
npm ERR!   node_modules/@coreui/icons-react
npm ERR!     @coreui/icons-react@"^2.0.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

@rnkdsh
Copy link
Author

rnkdsh commented Aug 3, 2022

As a quick fix you can force install dependencies using npm install --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants