0

I'm upgrading a React Native project to v0.63.4, and am getting a similar error to the one in this question. In the accepted answer to that question, the user shares what the contents of your Podfile should be. That's the same as what the React Native upgrade helper indicates the Podfile should be.

The Podfile in my project contains a bunch of lines like

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

What I Want To Know: Should I remove all lines like that ^ and make the Podfile identical to the one in the React Native upgrade helper? Or should I still include those lines somehow?

gkeenley
  • 6,088
  • 8
  • 54
  • 129
  • 1
    Follow the instructions from the upgrade helper. Your Podfile will likely be very minimal once you're done). Wouldn't hurt to delete the Pods directory and run pod install again, too. – jnpdx Mar 23 '21 at 01:15
  • Thanks for your reply. The other question ^^ mentions deleting Podfile.lock. Do you know what the difference would be between deleting the Pods directory vs deleting Podfile.lock? – gkeenley Mar 23 '21 at 01:29
  • 1
    Good question -- I'd probably do both. The Podfile.lock stores information about what exact version of each pod is used. The Pods directory itself actually stores the downloaded code. – jnpdx Mar 23 '21 at 01:31
  • Ok thanks, so does the Pods directory get re-generated when you run `pod install`? I know Podfile.lock does – gkeenley Mar 23 '21 at 01:35
  • 1
    Yes, it does indeed – jnpdx Mar 23 '21 at 01:36
  • Gotcha. If you want to wrap that into a response I'll accept. – gkeenley Mar 23 '21 at 02:00

1 Answers1

1

Follow the instructions from the upgrade helper. Your Podfile will likely be very minimal once you're done).

Podfile.lock and the Pods directory can be safely deleted (and probably should for something like this, since it's a big change) -- they'll be regenerated on pod install.

jnpdx
  • 45,847
  • 6
  • 64
  • 94