'pod install error - "Unable to find a specification for `React-RCTActionSheet` depended upon by `RNReanimated`"

I am building this app for Android and Apple TV .The app is working in android but in IOS it gives this strange error.

sanjaydas@Sanjays-Mac-mini ios % arch -x86_64 pod install 

Auto-linking React Native modules for target `ReactNativeTvDemoTests`: RNCMaskedView, RNGestureHandler, RNPermissions, RNReanimated, RNScreens, react-native-config, react-native-safe-area-context, react-native-video, and rn-fetch-blob
Updating local specs repositories
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `fmt` from `../node_modules/react-native/third-party-podspecs/fmt.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[!] Unable to find a specification for `React-RCTActionSheet` depended upon by `RNReanimated`

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

I am using

  • M1 mac , macOs Big Sur 11.6

  • dependencies

    {
     "@react-native-community/masked-view": "^0.1.10",
     "@react-navigation/native": "^6.0.8",
     "@react-navigation/stack": "^6.1.1",
     "react": "17.0.2",
     "react-dom": "17.0.2",
     "react-native": "npm:react-native-tvos@latest",
     "react-native-config": "^1.4.5",
     "react-native-gesture-handler": "^2.3.2",
     "react-native-permissions": "^3.3.1",
     "react-native-reanimated": "^2.5.0",
     "react-native-safe-area-context": "^4.2.2",
     "react-native-screens": "^3.13.1",
     "react-native-video": "^5.1.1",
     "react-native-web": "^0.17.7",}
    
  • 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, '12.0' 
    
       target 'ReactNativeTvDemo' do
       target 'ReactNativeTvDemoTests' do
       inherit! :complete
      # Pods for testing
       config = use_native_modules!
       use_react_native!(:path => config["reactNativePath"])
       end
    
       # Enables Flipper.
       #
       # Note that if you have use_frameworks! enabled, Flipper will not work and
       # you should disable these next few lines.
       use_flipper!
       post_install do |installer|
       flipper_post_install(installer)
       end
       end
    
       target 'ReactNativeTvDemo-tvOS' do
       # Pods for ReactNativeTvDemo-tvOS
    
       target 'ReactNativeTvDemo-tvOSTests' do
       inherit! :search_paths
       # Pods for testing
       end
       end
    
    
  • Solutions used

    1. Updating pods. repo : arch -x86_64 pod install --repo-update

    2. Reinstal cocoapods :

      • brew install cocoapods
      • brew link --override cocoapods
    3. React/Core to React-Core : grep -rl "s.dependency 'React/Core'" node_modules/ | xargs sed -i '' 's=React/Core=React-Core=g'

    4. Install ffi : sudo arch -x86_64 gem install ffi

    I followed those solutions because they seems related somehow.None of the solutions worked so far.I have no idea how to solve this error now .Please help me .Thank you !



Solution 1:[1]

I had the same issue with RN 0.66.3

what worked for me:

  • delete Padfile.lock file
  • pod cache clean --all
  • cd ios && pod install && cd ..

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 div