Reputation: 189
Detox build is failing by throwing YogaKit.modulemap' fatal error not found
Xcode Version:- 11.3 "react": "16.11.0", "react-native": "0.62.2" "detox": "13.3.0", tried latest 16 version as well
But build got succeeded with the below configuration
"dependencies": { "react": "^16.3.0-alpha.1", "react-native": "0.59.9" }, "devDependencies": { "babel-jest": "22.4.1", "babel-preset-react-native": "4.0.0", "detox": "13.3.0", "jest": "22.4.2", "mocha": "^5.0.4", "react-test-renderer": "^16.3.0-alpha.1"
** BUILD SUCCEEDED **
I think latest version of react-native is not compatible with the detox. I tried to get resolve for Yogakit, but ended with no luck.
Please let me know if anything is required. I would be thankful if someone shared the working config with the latest react-native.
`fatal error: module map file ....../ios/build/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap' not found 1 error generated. 20 errors generated. fatal error: module map file '...../ios/build/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap' not found 1 error generated. 22 errors generated.
** BUILD FAILED **
The following build commands failed: CompileC /....../ios/build/Build/Intermediates.noindex/King.build/Debug-iphonesimulator/King.build/Objects-normal/x86_64/AppDelegate.o /....../ios/King/AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) detox[29631] ERROR: [cli.js] Error: Command failed: xcodebuild -project ios/King.xcodeproj -scheme King -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build`
Upvotes: 15
Views: 14141
Reputation: 878
This is how I got it working:
Upvotes: 3
Reputation: 195
On the Podfile target post install ...
post_install do |installer|
flipper_post_install(installer)
installer.pods_project.targets.each do |target|
if target.name == 'YogaKit'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end
end
Upvotes: 0
Reputation: 2997
I'm not sure what this Detox thing is so hopefully this isn't off topic
I came across this question by researching a missing YogaKit.modulemap not found kind of error (sorry I don't have the exact error) which I got after doing a pod install
.
I fixed it by opening [project].xcworkspace then at the top Product > Clean Build Folder
OR
shift + command + k
Make sure Xcode has finished cleaning the build before trying to run the project again.
Upvotes: 0
Reputation: 9
Xcode Menu -> File -> Save as Workspace -> (untitled name) and then open that workspace file in the Xcode, it will work
and then
https://www.youtube.com/watch?v=U30qHiEQWU8
Upvotes: 0
Reputation: 410
take a look at this config in package.json
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/example.app",
"build": "xcodebuild -project ios/example.xcodeproj -scheme example -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"device": {
"type": "iPhone 11 Pro"
}
}
}
}
and take a look at that
For React Native 0.60 or above, or any other iOS apps in a workspace (eg: CocoaPods) use -workspace ios/example.xcworkspace instead of -project.
Upvotes: 31