I have just created the new react native project with version 0.74.1 and project is running fine but there is some react version error when I try to add native-base into my project by using the below command as written on official native-base docs
npm install native-base [email protected] [email protected]
Error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"18.2.0" from the root project
npm ERR! peer react@"*" from [email protected]
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.3.1" from [email protected]
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@"*" from [email protected]
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!
npm ERR! For a full report see:
npm ERR! /Users/muhammadhassaan/.npm/_logs/2024-05-23T22_19_47_018Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /Users/muhammadhassaan/.npm/_logs/2024-05-23T22_19_47_018Z-debug-0.log