After carefully following the steps from the React Native upgrade helper and upgrading to 0.70 I can’t build neither from xcode nor with yarn ios
. Getting an error:
Cycle in dependencies between targets 'RNReanimated' and 'Pods-myproj'; building could produce unreliable results.
I have tried various things, including disintegrating pods, cleaning the project / derived data, swapping old/new build systems and even removing the target dependencies manually in xcode, however the issue persists (in the last case it just shows a different cyclic dependency). Has anyone encountered this when upgrading to React Native 0.70?
Full text of the error:
Cycle in dependencies between targets 'RNReanimated' and 'Pods-myproj'; building could produce unreliable results.
Cycle path: RNReanimated → myproj → Pods-myproj → RNReanimated
Cycle details:
→ Target 'RNReanimated': Libtool /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Products/Debug-iphonesimulator/RNReanimated/libRNReanimated.a normal
○ Target 'RNReanimated' has target dependency on Target 'FBReactNativeSpec'
○ That command depends on command in Target 'FBReactNativeSpec': script phase “[CP-User] Generate Specs”
○ That command depends on command in Target 'myproj': script phase “Bundle React Native code and images”
→ Target 'myproj' has target dependency on Target 'Pods-myproj'
→ Target 'Pods-myproj' has compile command with input '/Users/denyskniazhev/myproj/ios/Pods/Target Support Files/Pods-myproj/Pods-myproj-dummy.m'
Raw dependency cycle trace:
target: ->
node: <all> ->
command: <all> ->
node: /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Products/Debug-iphonesimulator/RNReanimated/libRNReanimated.a ->
command: target-RNReanimated-8699adb1dd336b26511df848a716bd4253784ff6d1a0a1acaedc06a9f9e94921-:Debug:Libtool /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Products/Debug-iphonesimulator/RNReanimated/libRNReanimated.a normal ->
node: /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/Objects-normal/x86_64/AnimatedSensorModule.o ->
command: target-RNReanimated-8699adb1dd336b26511df848a716bd4253784ff6d1a0a1acaedc06a9f9e94921-:Debug:CompileC /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/Objects-normal/x86_64/AnimatedSensorModule.o /Users/denyskniazhev/myproj/node_modules/react-native-reanimated/Common/cpp/AnimatedSensor/AnimatedSensorModule.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler ->
node: <target-RNReanimated-8699adb1dd336b26511df848a716bd4253784ff6d1a0a1acaedc06a9f9e94921--begin-compiling> ->
command: Gate target-RNReanimated-8699adb1dd336b26511df848a716bd4253784ff6d1a0a1acaedc06a9f9e94921--begin-compiling ->
CYCLE POINT ->
node: <target-FBReactNativeSpec-8699adb1dd336b26511df848a716bd42d8e73feadee6a8e5c14524fc300acaed--modules-ready> ->
command: Gate target-FBReactNativeSpec-8699adb1dd336b26511df848a716bd42d8e73feadee6a8e5c14524fc300acaed--modules-ready ->
node: /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/DerivedSources/codegen-FBReactNativeSpec.log ->
command: target-FBReactNativeSpec-8699adb1dd336b26511df848a716bd42d8e73feadee6a8e5c14524fc300acaed-:Debug:PhaseScriptExecution [CP-User] Generate Specs /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-46EB2E00024690.sh ->
node: /Users/denyskniazhev/myproj/ios/.xcode.env.local/ ->
directoryTreeSignature: 2 ->
directoryContents: /Users/denyskniazhev/myproj/ios/.xcode.env.local ->
node: /Users/denyskniazhev/myproj/ios/.xcode.env.local ->
command: target-myproj-31124c55eae76d2f6224153cd522b4b97ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:PhaseScriptExecution Bundle React Native code and images /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Intermediates.noindex/myproj.build/Debug-iphonesimulator/myproj.build/Script-00DD1BFF1BD5951E006B06BC.sh ->
node: /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Intermediates.noindex/myproj.build/Debug-iphonesimulator/myproj.build/Script-00DD1BFF1BD5951E006B06BC.sh ->
command: target-myproj-31124c55eae76d2f6224153cd522b4b97ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:WriteAuxiliaryFile /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Intermediates.noindex/myproj.build/Debug-iphonesimulator/myproj.build/Script-00DD1BFF1BD5951E006B06BC.sh ->
node: <target-myproj-31124c55eae76d2f6224153cd522b4b97ceb6b36bcfc2fb90f69ac96de4975d6--entry> ->
command: Gate target-myproj-31124c55eae76d2f6224153cd522b4b97ceb6b36bcfc2fb90f69ac96de4975d6--entry ->
node: <target-Pods-myproj-8699adb1dd336b26511df848a716bd427e062cc62f6a1d52d742a11ac20f0458--end> ->
command: Gate target-Pods-myproj-8699adb1dd336b26511df848a716bd427e062cc62f6a1d52d742a11ac20f0458--end ->
node: /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Pods-myproj.build/Objects-normal/x86_64/Pods-myproj-dummy.o ->
command: target-Pods-myproj-8699adb1dd336b26511df848a716bd427e062cc62f6a1d52d742a11ac20f0458-:Debug:CompileC /Users/denyskniazhev/Library/Developer/Xcode/DerivedData/myproj-chxzpwxxfrrttoddglozfoottfdh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Pods-myproj.build/Objects-normal/x86_64/Pods-myproj-dummy.o /Users/denyskniazhev/myproj/ios/Pods/Target Support Files/Pods-myproj/Pods-myproj-dummy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler ->
node: <target-Pods-myproj-8699adb1dd336b26511df848a716bd427e062cc62f6a1d52d742a11ac20f0458--begin-compiling> ->
command: Gate target-Pods-myproj-8699adb1dd336b26511df848a716bd427e062cc62f6a1d52d742a11ac20f0458--begin-compiling ->
node: <target-FBReactNativeSpec-8699adb1dd336b26511df848a716bd42d8e73feadee6a8e5c14524fc300acaed--modules-ready>
I have opened a ticket but there’s no activity on it yet.
2
Answers
Try this with above or latest version of React Native
npx react-native-asset
In my case, I had to check my
project.pbxproj
file agains the RN template project. While I was upgrading the RN version I added by mistake:to
outputPaths
instead ofinputPaths