0
Romaine posted
React native - Error : Could not resolve dependency
npm install
i tried to install all depedency.
npm install
but some how i getting following error :
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! react@"17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0" from @react-native-community/masked-view@0.1.10
npm ERR! node_modules/@react-native-community/masked-view
npm ERR! @react-native-community/masked-view@"0.1.10" 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!
Edited question #1 :
i tried install by force but it wont work
npm install --force
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-native-community/masked-view@0.1.10
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN react@"17.0.2" from the root project
npm WARN 11 more (@react-navigation/drawer, @react-navigation/native, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.0" from @react-native-community/masked-view@0.1.10
npm WARN node_modules/@react-native-community/masked-view
npm WARN @react-native-community/masked-view@"0.1.10" from the root project
npm WARN 1 more (@react-navigation/stack)
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN peer react@"^16.0" from @react-native-community/masked-view@0.1.10
npm WARN node_modules/@react-native-community/masked-view
npm WARN @react-native-community/masked-view@"0.1.10" from the root project
npm WARN 1 more (@react-navigation/stack)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-navigation/stack@5.14.3
npm WARN Found: @react-navigation/native@6.0.6
npm WARN node_modules/@react-navigation/native
npm WARN @react-navigation/native@"^6.0.6" from the root project
npm WARN 1 more (@react-navigation/drawer)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @react-navigation/native@"^5.0.5" from @react-navigation/stack@5.1
4.3
npm WARN node_modules/@react-navigation/stack
npm WARN @react-navigation/stack@"^5.2.9" from the root project
npm WARN
npm WARN Conflicting peer dependency: @react-navigation/native@5.9.8
npm WARN node_modules/@react-navigation/native
npm WARN peer @react-navigation/native@"^5.0.5" from @react-navigation/stack@5
.14.3
npm WARN node_modules/@react-navigation/stack
npm WARN @react-navigation/stack@"^5.2.9" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-native@0.63.2
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN react@"17.0.2" from the root project
npm WARN 11 more (@react-navigation/drawer, @react-navigation/native, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"16.13.1" from react-native@0.63.2
npm WARN node_modules/react-native
npm WARN react-native@"https://github.com/expo/react-native/archive/sdk-42.0.0
.tar.gz" from the root project
npm WARN 12 more (@react-native-community/masked-view, ...)
npm WARN
npm WARN Conflicting peer dependency: react@16.13.1
npm WARN node_modules/react
npm WARN peer react@"16.13.1" from react-native@0.63.2
npm WARN node_modules/react-native
npm WARN react-native@"https://github.com/expo/react-native/archive/sdk-42.0
.0.tar.gz" from the root project
npm WARN 12 more (@react-native-community/masked-view, ...)
npm ERR! code EBUSY
npm ERR! syscall rename
Edited Question #2
yarn install work for me to install all module but application did not give proper output , npm start work but it give me blank screen with error so may be some module not compatible with current version of react . not sure
yarn install
npm install --force