npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   peer react@">=16.0" from @react-native-community/masked-view@0.1.11
npm ERR!   node_modules/@react-native-community/masked-view
npm ERR!     peer @react-native-community/masked-view@">= 0.1.0" from @react-navigation/stack@5.14.5
npm ERR!     node_modules/@react-navigation/stack
npm ERR!       @react-navigation/stack@"^5.14.5" from the root project
npm ERR!     @react-native-community/masked-view@"^0.1.11" from the root project
npm ERR!   peer react@"*" from @react-navigation/bottom-tabs@5.11.11
npm ERR!   node_modules/@react-navigation/bottom-tabs
npm ERR!     @react-navigation/bottom-tabs@"^5.11.11" from the root project
npm ERR!   15 more (@react-navigation/core, @react-navigation/native, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.3.0" from @callstack/react-theme-provider@3.0.6
npm ERR! node_modules/react-native-paper/node_modules/@callstack/react-theme-provider
npm ERR!   @callstack/react-theme-provider@"^3.0.6" from react-native-paper@4.9.1
npm ERR!   node_modules/react-native-paper
npm ERR!     react-native-paper@"*" 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! A complete log of this run can be found in:
            Asked
            
        
        
            Active
            
        
            Viewed 1,817 times
        
    2
            
            
         
    
    
        Martijn Pieters
        
- 1,048,767
- 296
- 4,058
- 3,343
 
    
    
        Bhavin Kathiriya
        
- 19
- 3
2 Answers
4
            
            
        Use --force with your npm install command.
npm install <package-name> --force
The package you are trying to install has a dependency on React v16, but you have React v17.
This errors are thrown encountered in the latest npm version.
 
    
    
        Aniket Kolekar
        
- 383
- 6
- 19
0
            
            
        Maybe you can try this one, before running npm install.
npm config set legacy-peer-deps true
 
    
    
        Handi
        
- 59
- 5