GeekyAnts / GeekyAnts/NativeBase
Cannot install NativeBase due to dependencies
- Dominant language
- TypeScript
- Stars
- 20.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
i cannot install native-base in my expo app and it gives out the error mentioned below
### CodeSandbox/Snack link
****
### Steps to reproduce
1. type in terminal `expo install native-base` or `npm install native-base`
2. It gives out the error
```
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ***********@1.0.0
npm ERR! Found: react@18.0.0
npm ERR! node_modules/react
npm ERR! react@"18.0.0" from the root project
npm ERR! peer react@"*" from native-base@3.4.16
npm ERR! node_modules/native-base
npm ERR! native-base@"*" 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.16
npm ERR! node_modules/native-base
npm ERR! native-base@"*" 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 C:\Users\user\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2022-09-20T20_36_36_193Z-debug-0.log
```
### NativeBase Version
3.4.16
### Platform
- [ ] Android
- [ ] CRA
- [X] Expo
- [ ] iOS
- [ ] Next
### Other Platform
_No response_
### Additional Information
`eresolve-report.txt`
```
# npm resolution error report
2022-09-20T20:37:52.850Z
While resolving: ******@1.0.0
Found: react@18.0.0
node_modules/react
react@"18.0.0" from the root project
peer react@"*" from native-base@3.4.16
node_modules/native-base
native-base@"3.4.16" from the root project
Could not resolve dependency:
peer react@"^18.2.0" from react-dom@18.2.0
node_modules/react-dom
peer react-dom@"*" from native-base@3.4.16
node_modules/native-base
native-base@"3.4.16" from the root project
Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
Raw JSON explanation object:
{
"code": "ERESOLVE",
"current": {
"name": "react",
"version": "18.0.0",
"whileInstalling": {
"name": "******",
"version": "1.0.0",
"path": "C:\\Users\\user\\******\\******\\******"
},
"location": "node_modules/react",
"isWorkspace": false,
"dependents": [
{
"type": "prod",
"name": "react",
"spec": "18.0.0",
"from": {
"location": "C:\\Users\\user\\******\\******\\******"
}
},
{
"type": "peer",
"name": "react",
"spec": "*",
"from": {
"name": "native-base",
"version": "3.4.16",
"whileInstalling": {
"name": "******",
"version": "1.0.0",
"path": "C:\\Users\\user\\******\\******\\******"
},
"location": "node_modules/native-base",
"isWorkspace": false,
"dependents": [
{
"type": "prod",
"name": "native-base",
"spec": "3.4.16",
"from": {
"location": "C:\\Users\\user\\******\\******\\******"
}
}
]
}
}
]
},
"currentEdge": {
"type": "prod",
"name": "react",
"spec": "18.0.0",
"from": {
"location": "C:\\Users\\user\\******\\******\\******"
}
},
"edge": {
"type": "peer",
"name": "react",
"spec": "^18.2.0",
"error": "INVALID",
"from": {
"name": "react-dom",
"version": "18.2.0",
"whileInstalling": {
"name": "******",
"version": "1.0.0",
"path": "C:\\Users\\user\\******\\******\\******"
},
"location": "node_modules/react-dom",
"isWorkspace": false,
"dependents": [
{
"type": "peer",
"name": "react-dom",
"spec": "*",
"from": {
"name": "native-base",
"version": "3.4.16",
"whileInstalling": {
"name": "******",
"version": "1.0.0",
"path": "C:\\Users\\user\\******\\******\\******"
},
"location": "node_modules/native-base",
"isWorkspace": false,
"dependents": [
{
"type": "prod",
"name": "native-base",
"spec": "3.4.16",
"from": {
"location": "C:\\Users\\user\\******\\******\\******"
}
}
]
}
}
]
}
},
"strictPeerDeps": false,
"force": false
}
```
i starred all locations to keep it a secret but it gives out basically the project's location
Contributor guide
Research direction
No repository files, tests, or entry points are mentioned. Start by reproducing the issue with `expo install native-base` and `npm install native-base` using the reported React 18.0.0 and NativeBase 3.4.16 versions; done means the dependency tree resolves without ERESOLVE.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100