stripe / stripe-react-native

React Native library for Stripe.
https://stripe.dev/stripe-react-native
MIT License
1.26k stars 261 forks source link

CocoaPods could not find compatible versions for pod "Stripe". #1356

Closed nitin251298 closed 1 year ago

nitin251298 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

nitin251298 commented 1 year ago

I am getting this error while run pod install

[!] CocoaPods could not find compatible versions for pod "Stripe": In snapshot (Podfile.lock): Stripe (= 23.3.3, ~> 23.3.0)

In Podfile: react-native-payments (from ../node_modules/react-native-payments) was resolved to 0.8.4, which depends on Stripe (~> 19)

stripe-react-native (from `../node_modules/@stripe/stripe-react-native`) was resolved to 0.23.3, which depends on
  Stripe (~> 23.3.0)

You have either:

nitin251298 commented 1 year ago

Here is my Pod File :

require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '13.0' install! 'cocoapods', :deterministic_uuids => false

target 'AStar8' do config = use_native_modules!

Flags change depending on the env values.

flags = get_default_flags()

use_react_native!( :path => config[:reactNativePath],

to enable hermes on iOS, change false to true and then install pods

:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."

)

pod 'RNCCheckbox', :path => '../node_modules/@react-native-community/checkbox'

pod 'react-native-video', :path => '../node_modules/react-native-video'

pod 'RNSVG', :path => '../node_modules/react-native-svg'

target 'AStar8Tests' do inherit! :complete

Pods for testing

end

Enables Flipper.

#

Note that if you have use_frameworks! enabled, Flipper will not work and

you should disable the next line.

use_flipper!() # update this part

post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) end

end

nitin251298 commented 1 year ago

Here is my Package.json file:

{ "name": "AStar8", "version": "1.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint .", "clean": "react-native clean-project", "clean:auto": "react-native clean-project-auto", "postinstall": "npm-install-peers" }, "dependencies": { "@lowkey/react-native-gif": "^3.1.0", "@react-native-async-storage/async-storage": "^1.17.7", "@react-native-community/checkbox": "^0.5.12", "@react-native-community/masked-view": "^0.1.11", "@react-native-community/push-notification-ios": "^1.11.0", "@react-native-firebase/app": "^17.4.2", "@react-native-firebase/messaging": "^17.4.2", "@react-native-masked-view/masked-view": "^0.2.8", "@react-native-picker/picker": "^2.4.2", "@react-navigation/native": "^6.0.11", "@react-navigation/stack": "^6.2.2", "@stripe/stripe-react-native": "^0.23.3", "@twotalltotems/react-native-otp-input": "^1.3.11", "assert": "^1.1.1", "axios": "^0.27.2", "i": "^0.3.7", "lottie-react-native": "^5.1.3", "moment": "^2.29.4", "npm": "^9.6.4", "react": "17.0.2", "react-dom": "17.0.2", "react-native": "0.68.0", "react-native-animatable": "^1.3.3", "react-native-apple-payment": "^1.1.1", "react-native-bouncy-checkbox": "^3.0.4", "react-native-calendar-picker": "^6.1.5", "react-native-circles": "^1.0.1", "react-native-circular-action-menu": "^0.5.0", "react-native-circular-progress-indicator": "^4.4.2", "react-native-collapsible": "^1.6.0", "react-native-cool-speedometer": "^1.1.5", "react-native-credit-card-input": "^0.4.1", "react-native-crypto": "^2.1.0", "react-native-date-picker": "^4.2.5", "react-native-elements": "^3.4.2", "react-native-gesture-handler": "^2.9.0", "react-native-image-crop-picker": "^0.38.0", "react-native-image-picker": "^4.8.5", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-linear-gradient": "^2.6.2", "react-native-modal": "^13.0.1", "react-native-otp-textinput": "^0.0.9", "react-native-paper": "^4.12.4", "react-native-payments": "^0.8.4", "react-native-popup-menu": "^0.15.12", "react-native-radial-gradient": "^1.1.2", "react-native-reanimated": "^2.14.4", "react-native-safe-area-context": "^4.4.1", "react-native-screen": "^1.0.1", "react-native-screens": "^3.20.0", "react-native-simple-gradient-progressbar-view": "^0.2.0", "react-native-sqlite-storage": "^6.0.1", "react-native-stripe-api": "^0.1.0", "react-native-stripe-checkout": "^0.0.15", "react-native-super-grid": "^4.4.2", "react-native-svg": "^13.9.0", "react-native-table-component": "^1.2.2", "react-native-vector-icons": "^9.2.0", "react-native-video": "^5.2.0", "react-native-video-player": "^0.14.0", "react-native-webview": "^11.23.1", "react-native-youtube-iframe": "^2.2.2", "react-redux": "^7.2.8", "redux": "^4.2.0", "redux-persist": "^6.0.0", "stripe": "^11.9.1", "svg": "^0.1.0", "toggle-switch-react-native": "^3.3.0", "yarn": "^1.22.19" }, "devDependencies": { "@babel/core": "^7.18.6", "@babel/runtime": "^7.18.6", "@react-native-community/eslint-config": "^3.0.3", "babel-jest": "^28.1.2", "babel-plugin-module-resolver": "^4.1.0", "deprecated-react-native-prop-types": "^4.0.0", "eslint": "^8.19.0", "jest": "^28.1.2", "metro-react-native-babel-preset": "^0.71.3", "react-native-clean-project": "^4.0.1", "react-test-renderer": "17.0.2" }, "jest": { "preset": "react-native" }, "rnpm": { "assets": [ "./assets/fonts" ] }, "react-native": { "zlib": "browserify-zlib", "console": "console-browserify", "constants": "constants-browserify", "crypto": "react-native-crypto", "dns": "dns.js", "net": "react-native-tcp", "domain": "domain-browser", "http": "@tradle/react-native-http", "https": "https-browserify", "os": "react-native-os", "path": "path-browserify", "querystring": "querystring-es3", "fs": "react-native-level-fs", "_stream_transform": "readable-stream/transform", "_stream_readable": "readable-stream/readable", "_stream_writable": "readable-stream/writable", "_stream_duplex": "readable-stream/duplex", "_stream_passthrough": "readable-stream/passthrough", "dgram": "react-native-udp", "stream": "stream-browserify", "timers": "timers-browserify", "tty": "tty-browserify", "vm": "vm-browserify", "tls": false }, "browser": { "zlib": "browserify-zlib", "console": "console-browserify", "constants": "constants-browserify", "crypto": "react-native-crypto", "dns": "dns.js", "net": "react-native-tcp", "domain": "domain-browser", "http": "@tradle/react-native-http", "https": "https-browserify", "os": "react-native-os", "path": "path-browserify", "querystring": "querystring-es3", "fs": "react-native-level-fs", "_stream_transform": "readable-stream/transform", "_stream_readable": "readable-stream/readable", "_stream_writable": "readable-stream/writable", "_stream_duplex": "readable-stream/duplex", "_stream_passthrough": "readable-stream/passthrough", "dgram": "react-native-udp", "stream": "stream-browserify", "timers": "timers-browserify", "tty": "tty-browserify", "vm": "vm-browserify", "tls": false } }

charliecruzan-stripe commented 1 year ago

Hi! This is because you have two dependencies relying on different Pod versions of the Stripe-ios

You should remove your dependency on react-native-payments, since all of the functionality in there is covered by this library