nx
nx copied to clipboard
iOS build failure in [email protected] - works in [email protected]
Current Behavior
iOS builds were working fine in [email protected] but started to fail after running nx migrate latest
Error message :
› Compiling react-native Pods/React-cxxreact » JSBigString.cpp
› Compiling react-native Pods/React-cxxreact » Instance.cpp
❌ (../../node_modules/react-native/ReactCommon/cxxreact/Instance.cpp:24:10)
22 | #include <folly/MoveWrapper.h>
23 | #include <folly/json.h>
> 24 | #include <react/debug/react_native_assert.h>
| ^ 'react/debug/react_native_assert.h' file not found
25 |
26 | #include <glog/logging.h>
27 |
› Signing react-native Pods/RCT-Folly » folly.framework
› Preparing @react-native-firebase/firestore Pods/gRPC-C++ » gRPC-C++-Info.plist
› Preparing react-native Pods/React-utils » React-utils-Info.plist
› Compiling react-native Pods/React-utils » ManagedObjectWrapper.mm
› Preparing react-native Pods/React-jsi » React-jsi-Info.plist
› Compiling react-native Pods/React-utils » RunLoopObserver.cpp
❌ (../../node_modules/react-native/ReactCommon/react/utils/RunLoopObserver.cpp:10:10)
8 | #include "RunLoopObserver.h"
9 |
> 10 | #include <react/debug/react_native_assert.h>
| ^ 'react/debug/react_native_assert.h' file not found
11 |
12 | namespace facebook {
13 | namespace react {
› Signing react-native Pods/React-jsi » jsi.framework
› Preparing react-native Pods/React-runtimescheduler » React-runtimescheduler-Info.plist
› Compiling react-native Pods/React-runtimescheduler » React_runtimescheduler_vers.c
› Compiling react-native Pods/React-runtimescheduler » Task.cpp
› Compiling react-native Pods/React-runtimescheduler » RuntimeSchedulerCallInvoker.cpp
› 2 error(s), and 19 warning(s)
CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.
> NX 1
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> NX Ran target run-ios for project fleek-customer and 2 task(s) they depend on (1m)
✖ 1/3 failed
✔ 2/3 succeeded [0 read from cache]
Expected Behavior
Builds successfully
GitHub Repo
No response
Steps to Reproduce
yarn nx run my-app:run-ios
Nx Report
yarn run v1.22.19
$ /Users/kamaldeepjayaprakash/Documents/fleek/code/fleek-monorepo/node_modules/.bin/nx report
> NX Report complete - copy this into the issue template
Node : 20.5.1
OS : darwin-arm64
yarn : 1.22.19
nx : 16.8.1
@nx/js : 16.8.1
@nx/jest : 16.8.1
@nx/linter : 16.8.1
@nx/workspace : 16.8.1
@nx/cypress : 16.8.1
@nx/detox : 16.8.1
@nx/devkit : 16.8.1
@nx/eslint-plugin : 16.8.1
@nx/expo : 16.8.1
@nx/next : 16.8.1
@nx/react : 16.8.1
@nrwl/tao : 16.8.1
@nx/web : 16.8.1
@nx/webpack : 16.8.1
nx-cloud : 16.4.0
typescript : 5.1.6
Done in 0.50s.
Failure Logs
No response
Package Manager Version
No response
Operating System
- [X] macOS
- [ ] Linux
- [ ] Windows
- [ ] Other (Please specify)
Additional Information
No response
Had the same issue, reverted to 0.72.3 and worked fine. This only affected building .app , building .iap files work fine. Can also confirm 0.72.4 works as expected. 0.72.5 doesn't
I also encounter this problem. The same version on react native without nx works fine.
If you're experiencing issues with React Native version 0.72.6, a viable solution might be to apply a patch from this GitHub pull request: React Native Pull Request #39177. This patch addresses the specific problem you're encountering.
To implement this fix, you can use the patch-package tool to apply the changes from the pull request to your project. I've personally tested this approach with React Native 0.72.6, and it successfully resolved the issue for me.
Note: do the reverse: add File.absolute_path() to all header_mappings_dir.
Does anyone has tried with RN 0.73.+ ?
Yes. I just get errors of this sort even earlier in the build process caused by Yoga.
@sheepma how did you get patch-package to apply the changes? It just errors for me (and same with git am filename.patch. I'm doing it by hand now, but I'd love to know for the future.
@Slapbox I am using RN 0.72.6 and the patch-package shared by you is already there in the same version but still the error remains the same. Can you help me?
I'm not the one who shared the fix originally, but what I ended up doing was manually implementing it and then using patch-package to make the patch. It did solve my problem though. Unfortunately I'm only following advice and have no further guidance I can provide.
What error do you get after implementing the patch? Are you sure you implemented it correctly? The first times I missed updating a couple references and it worked after I fixed those.
Same problem with react-native 0.74.0 any help?
This is the error i've got:
The following build commands failed: CompileC /Users/rodrigodiasdefigueiredo/Library/Developer/Xcode/DerivedData/rn074andLottie-fsauvjzcwuwrbwftagkztsxizjqe/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-utils-framework.build/Objects-normal/arm64/RunLoopObserver.o /Users/rodrigodiasdefigueiredo/Desktop/rn074andLottie/node_modules/react-native/ReactCommon/react/utils/RunLoopObserver.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-utils-framework' from project 'Pods')
Same here
The following build commands failed: CompileC /Users/martinseigneuret/Library/Developer/Xcode/DerivedData/SneakmartApp-fmxeibanrznxrpbbbayerstjfxcr/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-utils.build/Objects-normal/arm64/RunLoopObserver.o /Users/martinseigneuret/Documents/Sneakmart/sneakmart-front-monorepo/node_modules/react-native/ReactCommon/react/utils/RunLoopObserver.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-utils' from project 'Pods') (1 failure)
Some news?
I'm getting the same problem
The following build commands failed:
CompileC /Users/ZasZZ/Library/Developer/Xcode/DerivedData/AppSww-bvnljybxosrcstdjytvqczotnehk/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-cxxreact.build/Objects-normal/arm64/Instance.o /Users/ZasZZ/Documents/Projects/AppSww/core/node_modules/react-native/ReactCommon/cxxreact/Instance.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-cxxreact' from project 'Pods')
(1 failure)
"react-native": "0.74.1"
@rodrigodiasf1984 does your issue persist? If you look above that message, is the root cause related to this issue? https://github.com/facebook/react-native/issues/44340
Or is it the react_native_assert.h issue here?
It's not clear from your message which file exactly is causing the failure.
@rodrigodiasf1984 does your issue persist? If you look above that message, is the root cause related to this issue? Facebook/react-native#44340
Or is it the
react_native_assert.hissue here?It's not clear from your message which file exactly is causing the failure.
i've found a solution to fix it, sorry but i don't remeber what i did
Same here, happens only with Nx not RN CLI #28293