react-native-deck-swiper icon indicating copy to clipboard operation
react-native-deck-swiper copied to clipboard

Package Not Compatible with RN 0.63

Open oporter1 opened this issue 4 years ago • 9 comments

I upgraded my expo project which upgraded my RN version to 0.63.2

When I try to run npm install react-native-deck-swiper --save the below error is returned:

npm ERR! Found: [email protected]
npm ERR! node_modules/react-native
npm ERR!   react-native@"https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.49.1" from [email protected]

It looks like this package is requiring an older version of RN? Do you have any idea why it would be rejecting me?

My Expo Specs:

Expo CLI 4.0.4 environment info:
  System:
    OS: macOS 11.0.1
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.3.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.0.14 - /usr/local/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 14.3, DriverKit 20.0, macOS 11.1, tvOS 14.3, watchOS 7.2
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6953283
    Xcode: 12.3/12C5020f - /usr/bin/xcodebuild
  npmPackages:
    expo: ^39.0.0 => 39.0.5 
    react: 16.13.1 => 16.13.1 
    react-dom: 16.13.1 => 16.13.1 
    react-native: https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz => 0.63.2 
    react-navigation: ^3.13.0 => 3.13.0 
  npmGlobalPackages:
    expo-cli: 4.0.4
  Expo Workflow: managed

oporter1 avatar Dec 01 '20 16:12 oporter1

This worked for me on Expo SDK 40 (still RN version 0.63.2).

Have you tried cleaning out your node_modules/ directory and reinstalling from scratch? FWIW I use yarn.

richardwu avatar Jan 31 '21 05:01 richardwu

Working for me on React-Native 0.63.3

maurocen avatar Feb 04 '21 15:02 maurocen

It worked for me but I had to install like this:

npm i react-native-deck-swiper --legacy-peer-deps

james2406 avatar Feb 17 '21 19:02 james2406

The issue is with the deck not rendering on Android devices. It works on ios.

Infinitism avatar Aug 30 '21 02:08 Infinitism

Curious if anyone has found a better solution? I had to upgrade my RN version to support another package.

I used --legacy-peer-deps and also tried --force on the npm install. I was able to get it to work in the emulator, but I've not been able to compile the build with expo build:ios as I normally do for production.

I suspect it's because the "install" in the npm package manager can't do the force when the build is compiled. It's frustrating because the package appears to actually work fine for newer versions of React Native. Does anyone here know if the library is still managed? I've gotten to the point that I've contemplated cloning the package and changing the version dependency so it compiles normally between build and run without having to force the package.

I'm completely stuck in the position that I need both packages for the app to work in my case and I'm unsure how to release this.

Even my crash reports won't run in my use case. It'll run fine in the emulator or the device if connected, but when it's sent to the App Store/TestFlight it kills itself before the landing screen even renders.

brteller avatar Jul 20 '22 12:07 brteller

version 2.0.7 should work with latest RN / react combos.

webraptor avatar Jul 20 '22 12:07 webraptor

So I'm using Expo to manage the project and I confirmed I'm using version 2.0.8. I was using npm which caused the conflicts. I switched over to using Yarn and it's working now.

If the developers see this, this creates an issue of expo managed projects using npm which causes an issue of generating a proper info.plist whenever the iOS directory is created. Essentially making the usefulness of expo worthless.

I can confirm the package works fine, so if the developers could fix this dependency requirement to support newer versions of RN it should fix the issue. I'd imagine it's relatively small of an issue since when I force it with no info.plist requirements it works fine but is completely unusable to send to the app store/running packages with npm.

brteller avatar Aug 13 '22 00:08 brteller

@brteller How did you convert the expo project from npm to yarn? I tried deleting the node_modules and package-lock file followed by yarn install, but i end up with another error.

image

Expo recomends using npm and doesn't provide a guide on how to re-initialize the project with yarn :(

SorenJ89 avatar Feb 04 '23 13:02 SorenJ89

Sorry for the bother. I found the solution right after asking. Cleaning the cache for npm and yarn was what solved it.

SorenJ89 avatar Feb 04 '23 14:02 SorenJ89