GeekyAnts / GeekyAnts/NativeBase
Can't install Native Base due to mismatching versions of React
- Dominant language
- TypeScript
- Stars
- 20.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
I am trying to install Native Base in my project, but am getting an isntallation error because the peer dependency for React is 18.2. The latest version of React supported by React Native is 18.1, and Native Base requires 18.2
### CodeSandbox/Snack link
N/A
### Steps to reproduce
I got this error in two ways:
`npm install native-base` in my existing project, and
`npx react-native init MyApp --template @native-base/react-native-template` trying to create a demo project so I could get the right dependency versions.
In either case I'm greeted with this error:
```
✖ Installing dependencies
error Error: Command failed: npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: myapp@0.0.1
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! react@"17.0.1" from the root project
npm ERR! peer react@"*" from native-base@3.4.0
npm ERR! node_modules/native-base
npm ERR! native-base@"3.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.2.0" from react-dom@18.2.0
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@"*" from native-base@3.4.0
npm ERR! node_modules/native-base
npm ERR! native-base@"3.4.0" 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 /Users//.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users//.npm/_logs/2022-11-14T12_24_10_169Z-debug-0.log
```
### NativeBase Version
3.4.21
### Platform
- [ ] Android
- [X] CRA
- [ ] Expo
- [ ] iOS
- [ ] Next
### Other Platform
_No response_
### Additional Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.