skip to Main Content

I have upgrade react-native to 0.64 and I’m getting this error after I run pod install.

No podspec found for `FBReactNativeSpec` in `../node_modules/react-native/Libraries/FBReactNativeSpec`

I have tried to remove the node_module, remove the pod file, deintegrate, but still got this issue.

Any help?

4

Answers


  1. Try npx react-native-clean-project
    Input ‘Y’ for all the prompts asked.

    Login or Signup to reply.
  2. I had the same question these days and found out it was because of the command npm audit fix i ran. It automatically updated react native version, which made podfile somehow confused. Downgrade your rn package or reset your version control should work

    Login or Signup to reply.
  3. While I am updating to the new react-native version 0.64.1,then I got the above-mentioned error when I tried pod install.I have fixed the issue by replacing the content on my podfile like the following

    https://raw.githubusercontent.com/react-native-community/rn-diff-purge/release/0.64.1/RnDiffApp/ios/Podfile

    require_relative '../node_modules/react-native/scripts/react_native_pods'
    require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
    
    platform :ios, '10.0'
    
    target 'RnDiffApp' do
      config = use_native_modules!
    
      use_react_native!(
        :path => config[:reactNativePath],
        # to enable hermes on iOS, change `false` to `true` and then install pods
        :hermes_enabled => false
      )
    
      target 'RnDiffAppTests' 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!()
    
      post_install do |installer|
        react_native_post_install(installer)
      end
    end
    

    I changed my podfile like the above.Then I tried pod install on my terminal.Its working fine.

    Login or Signup to reply.
  4. The newer version of ReactNative (starting from 0.64) store FBReactNativeSpec in another folder.
    You will need to replace the legacy FBReactNativeSpec path with the new one in the Pod declaration.

    Open your Podfile and find this line :

    pod 'FBReactNativeSpec', :path => "./node_modules/react-native/Libraries/FBReactNativeSpec"
    

    And fix the path by replacing with this one :

    pod 'FBReactNativeSpec', :path => "../node_modules/react-native/React/FBReactNativeSpec"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search