Bro Lee
Bro Lee

Reputation: 41

React Native deck swiper library not working

I am trying to install the react native deck swiper using npm and I am getting the following error. Guys is the something wrong with this library "npm install react-native-deck-swiper" and if there is how do we fix it?

npm WARN config global --global, --local are deprecated. Use --location=global instead. npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react-native npm ERR! peer react-native@"" from @react-native-community/[email protected] npm ERR! node_modules/@react-native-community/cli npm ERR! @react-native-community/cli@"^8.0.4" from [email protected] npm ERR! peer react-native@"" from @react-navigation/[email protected] npm ERR! node_modules/@react-navigation/elements npm ERR! @react-navigation/elements@"^1.3.5" from @react-navigation/[email protected] npm ERR! node_modules/@react-navigation/native-stack npm ERR! @react-navigation/native-stack@"^6.8.0" from the root project npm ERR! 6 more (@react-navigation/native, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react-native@"^0.49.1" from [email protected] npm ERR! node_modules/react-native-deck-swiper npm ERR! react-native-deck-swiper@"^2.0.8" from the root project npm ERR! npm ERR! Conflicting peer dependency: [email protected] npm ERR! node_modules/react-native npm ERR! peer react-native@"^0.49.1" from [email protected] npm ERR! node_modules/react-native-deck-swiper npm ERR! react-native-deck-swiper@"^2.0.8" 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\Leago\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\Leago\AppData\Local\npm-cache_logs\2022-08-31T23_17_27_722Z-debug-0.log

Upvotes: 0

Views: 386

Answers (1)

user20870706
user20870706

Reputation: 11

I had the same issue as you, I found out it's more related to the command npm, apparently it works with yarn. You can check these two links in which the problem is treated, but I don't think forcing the installation with npm install --force is a good idea:

Upvotes: 1

Related Questions