rain
rain

Reputation: 43

react native run-ios redefinition of module 'YogaKit'

When running react-native run-ios in XCode 15, error shows up as follows:

-index-system-modules
/Users/wuyuliang/Desktop/work/halosaasrn/HaloSaasRN/ios/Pods/Headers/Public/YogaKit/YogaKit.modulemap:1:8: error: redefinition of module 'YogaKit'
module YogaKit {
       ^
/Users/wuyuliang/Library/Developer/Xcode/DerivedData/MeiTuan-dhbxzmvcprsfrjeeedhxpdtwesxk/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap:1:8: note: previously defined here
module YogaKit {
       ^
/Users/wuyuliang/Desktop/work/halosaasrn/HaloSaasRN/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'YogaKit' from project 'Pods')

** BUILD FAILED **


The following build commands failed:
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
        CompileSwift normal x86_64 /Users/wuyuliang/Desktop/work/halosaasrn/HaloSaasRN/ios/Pods/YogaKit/YogaKit/Source/YGLayoutExtensions.swift
(2 failures)

environment:

"react": "17.0.1",
"react-native": "0.64.2"

Can someone give me help?

Upvotes: 3

Views: 3823

Answers (1)

nima
nima

Reputation: 8915

As the error mentioned error: redefinition of module 'YogaKit' there are some problems with the project dependencies which prevent you to build or run your iOS application.

Try to clean all pod's cache:

rm -rf "${HOME}/Library/Caches/CocoaPods"

rm -rf ~/.cocoapods/repos

pod cache clean --all

Now, install the pods:

pod install

Upvotes: 4

Related Questions