stripe-identity-react-native icon indicating copy to clipboard operation
stripe-identity-react-native copied to clipboard

CocoaPods Dependency Conflict with StripePaymentSheet in React Native Project

Open sanirasheed opened this issue 10 months ago • 3 comments

Description

Problem Description

I am encountering a dependency conflict with the StripePaymentSheet pod while running pod install --repo-update in my React Native project. The issue arises because:

  1. My Podfile.lock specifies StripePaymentSheet (= 23.28.1, ~> 23.28.0).
  2. The stripe-react-native package (version 0.41.0) requires StripePaymentSheet (~> 24.2.0).
  3. The stripe-identity-react-native package causes conflicts.

This version mismatch prevents CocoaPods from resolving dependencies.

Error Message

[!] CocoaPods could not find compatible versions for pod "StripePaymentSheet": In snapshot (Podfile.lock): StripePaymentSheet (= 23.28.1, ~> 23.28.0) In Podfile: stripe-react-native (from ../node_modules/@stripe/stripe-react-native) was resolved to 0.41.0, which depends on StripePaymentSheet (~> 24.2.0)

Steps to Reproduce

  1. Install the latest versions of @stripe/stripe-react-native and @stripe/stripe-identity-react-native:
  2. run pod install in the ios folder

Expected Behavior

CocoaPods should successfully resolve all dependencies and install the required pods without conflicts.

Actual Behavior

CocoaPods fails to resolve the dependency conflict between StripePaymentSheet versions 23.28.1 and 24.2.0

Steps Already Taken

  1. Updated CocoaPods repositories
  2. Cleaned and reinstalled pods
  3. Attempted to force update StripePaymentSheet
  4. Downgraded stripe-react-native to a version compatible with StripePaymentSheet 23.28.1
  5. Used --legacy-peer-deps during npm installation

Removing stripe-identity-react-native solves the problem. However this package is needed for indentity verification. This issue only began 3 weeks ago. Prior to this "@stripe/stripe-identity-react-native": "^0.2.11" was used with stripe 0.38 and it worked fine. now however nothing works.

sanirasheed avatar Feb 09 '25 05:02 sanirasheed