coreui / coreui-icons

CoreUI Free Icons - Premium designed free icon set with marks in SVG, Webfont and raster formats
https://coreui.io/icons/
Other
2k stars 154 forks source link

Update React Version to 18+ #46

Open rnkdsh opened 2 years ago

rnkdsh commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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