rocketclimb / rocketicons

React and React Native icons powered by Tailwind
https://rocketicons.io
MIT License
65 stars 0 forks source link

Cannot be installed with React and React DOM v18.3.1 #106

Closed DenkingOfficial closed 4 months ago

DenkingOfficial commented 5 months ago

Problem:

While installing I got this error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: my-project@0.0.0
npm ERR! Found: react@18.3.1
npm ERR! node_modules/react
npm ERR!  peer react@"^18.3.1" from react-dom@18.3.1
npm ERR!  node_modules/react-dom
npm ERR!   react-dom@"^18.2.0" from the root project
npm ERR!  react@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! rocketicons@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@18.2.0
npm ERR! node_modules/react
npm ERR!  peer react@"18.2.0" from react-native@0.74.1
npm ERR!  node_modules/react-native
npm ERR!   peer react-native@"*" from react-native-svg@15.2.0
npm ERR!   node_modules/react-native-svg
npm ERR!    peer react-native-svg@">=15" from rocketicons@0.2.0-alpha
npm ERR!    node_modules/rocketicons
npm ERR!     rocketicons@"*" 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.

As I can see @dependabot created a pull request #95

To reproduce:

  1. Create new react app with react 18.3.1
  2. Run npm install rocketicons
  3. Get error
DenkingOfficial commented 5 months ago

Also, it might be a good idea to separate React and React Native libraries into different packages

amorimjj commented 4 months ago

Also, it might be a good idea to separate React and React Native libraries into different packages

We thought about that, but it makes no sense since the goal here is to use exactly the same code on React and React Native, allowing devs to share the same code base across the project.

That said, we marked react-native dependencies as optional, what brings the same result for React users