When upgrading to 0.64-rc3, error: Cycle in dependencies between targets ‘FBReactNativeSpec’

Description

When upgrading to 0.64-rc3, I was stuck for many hours today on this compliation error:

Cycle in dependencies between targets 'BVLinearGradient' and 'FBReactNativeSpec'.

The initial target is irrelevant; if I removed BVLinearGradient it would still happen for many different native libraries and FBReactNativeSpec.

React Native version:

0.64-rc3 on iOS

Steps To Reproduce

Repro was consistent in my project. Maybe has something to do with the fact that I use use_frameworks!, and in the latest sample Podfile React Native does not include this directive.

Workaround

I was able to workaround this issue (and thus want to document it here for others who may get stuck) by:

Navigating to the FBReactNativeSpec target in the Pods project and deleting [CP-User] Generate Specs step.

I then navigated in the terminal to:

<project>/node_modules/react-native/scripts

And I manually ran from the terminal:

./generate-specs.sh

1 possible answer(s) on “When upgrading to 0.64-rc3, error: Cycle in dependencies between targets ‘FBReactNativeSpec’