Cycle in dependencies between targets 'FBReactNativeSpec' and 'Yoga'; building could produce unreliable results

Viewed 3730

Whenever I run "react-native run-ios" I'm getting the following build error

error: Cycle in dependencies between targets 'FBReactNativeSpec' and 'Yoga'; building could produce unreliable results. Cycle path: FBReactNativeSpec → Folly → glog → YogaKit → Yoga → FBReactNativeSpec Cycle details: → Target 'FBReactNativeSpec' has target dependency on Target 'Folly' → Target 'Folly' has target dependency on Target 'glog' → Target 'glog' has compile command with input '/Users/ajayhg/Myproj/ios/Pods/Target Support Files/glog/glog-dummy.m' ○ That command depends on command in Target 'YogaKit': script phase “Copy generated compatibility header” → Target 'YogaKit' has target dependency on Target 'Yoga' → Target 'Yoga' has compile command with input '/Users/ajayhg/Myproj/ios/Pods/Target Support Files/Yoga/Yoga-dummy.m'

how to resolve this?

2 Answers

I solved the problem by doing ⌘+Shift+K and rebuilding.

I have exact same problem on our app, but unfortunately no solution yet.

Known workaronds are:

  1. Switch to legacy build system. It doesn't react on those "fake" cycles
  2. Clean and rebuild usually helps. If not, then try to clean and reinstal cocoapods.
Related