react-native-unimodules icon indicating copy to clipboard operation
react-native-unimodules copied to clipboard

Pod Install Failed RN0.59

Open nolife08021 opened this issue 5 years ago • 3 comments

I get error while running pod install. RN0.59

-"react": "16.8.3", -"react-native": "0.59.5",

# Uncomment the next line to define a global platform for your project
 platform :ios, '10.0'

require_relative '../node_modules/react-native-unimodules/cocoapods.rb'

target 'ymyapp' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for ymyapp
 pod 'Firebase/Core'
  pod 'Firebase'
  pod 'Fabric', '~> 1.9.0'
  pod 'Crashlytics', '~> 3.12.0'
  pod 'Firebase/Messaging', '~> 5.3.0'
  pod 'Firebase/Functions', '~> 5.3.0'
  pod 'GoogleAppMeasurement', '~> 5.2.0'
  pod 'FirebaseInstanceID'
  pod 'react-native-sqlite-storage', :path => '../node_modules/react-native-sqlite-storage'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
  'Core',
  'RCTImage',
  'DevSupport',
  'RCTNetwork',
  'RCTWebSocket'
]
pod 'Google-Mobile-Ads-SDK'

  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'

  # Native Module cannot be null
  pod 'RNCPushNotificationIOS', :path => '../node_modules/@react-native-community/push-notification-ios/RNCPushNotificationIOS.podspec'


  pod 'RNImageCropPicker', :path =>  '../node_modules/react-native-image-crop-picker'
  pod 'react-native-camera', path: '../node_modules/react-native-camera'
  pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'
  pod 'lottie-ios', :path => '../node_modules/lottie-ios'
  pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
  pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
  pod 'react-native-image-resizer', :path => '../node_modules/react-native-image-resizer'
  pod 'RNSVG', :path => '../node_modules/react-native-svg'
  pod 'react-native-contacts', :path => '../node_modules/react-native-contacts'
  pod 'ReactNativeExceptionHandler', :path => '../node_modules/react-native-exception-handler'
  pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
  pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'
  pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
  pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
  pod 'react-native-add-calendar-event', :path => '../node_modules/react-native-add-calendar-event'
  pod 'react-native-orientation', :path => '../node_modules/react-native-orientation'
  pod 'RNShare', :path => '../node_modules/react-native-share'
  pod 'TextToSpeech', :path => '../node_modules/react-native-tts'
  pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'
  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
  pod 'react-native-webview', :path => '../node_modules/react-native-webview'
  pod 'RNIap', :path => '../node_modules/react-native-iap'

  use_unimodules!


  target 'ymyappTests' do
    inherit! :search_paths
    # Pods for testing
  end

end
post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == "React"
            target.remove_from_project
        end
    end
end


target 'ymyapp-tvOS' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for ymyapp-tvOS

  target 'ymyapp-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

Error

[!] Unable to find a specification for React-Core depended upon by UMReactNativeAdapter

You have either:

out-of-date source repos which you can update with pod repo update or with pod install --repo-update. mistyped the name or version. not added the source repo that hosts the Podspec to your Podfile.

nolife08021 avatar Dec 17 '19 08:12 nolife08021

Hey, since in SDK36 we've upgraded unimodules to RN 0.61, in general we can't ensure that they will work properly in older RN versions. Given that I would have recommended staying on [email protected] and respective unimodules.

However, I believe this shouldn't be a problem and since UMReactNativeAdapter is the only pod depending on React whose dependencies requirements changed, you could get away with latest versions of all unimodules except @unimodules/react-native-adapter.

To sum up,

  • either downgrade react-native-unimodules installation to 0.6.x (or 0.7.0-rc.4 if you need AndroidX compatibility),
  • or stay on [email protected], but force @unimodules/react-native-adapter to be installed in ~4.0.0 (I'm not sure, but I would hope that specifying @u/r-n-a@~4.0.0 in root package.json should do the trick).

sjchmiela avatar Dec 17 '19 08:12 sjchmiela

@sjchmiela neither solution seems to work, 0.7.0-rc.4 gives the same error. and installing extra @unimodules/react-native-adapter does not affect the version installed inside react-native-unimodules, both versions will be installed in the app, but react-native-unimodules will use the version its own package.json specified.

Currently I need to switch to 0.6.0 to build ios version, and change back to 0.7.0 for androidX build.

nicholasxuu avatar Dec 24 '19 02:12 nicholasxuu

Hi @nicholasxuu , I have used npm shrinkwrap as per this thread: https://stackoverflow.com/questions/15806152/how-do-i-override-nested-npm-dependency-versions and this fixed the problem for myself.

acnalesso avatar Jan 22 '20 19:01 acnalesso