-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nx run-ios does not compile on Apple M1 with freshly installed tools and fresh workspace #22316
Comments
Nothing yet? I know you guys are very busy, but if you can shine a light would be great! |
I'm facing a similar error but I'm not using NX |
@caiorg have you seen this? |
Just looked at it and still no success. The weird thing is I can it to work OUTSIDE a monorepo/workspaces folder with:
With all those steps, the app is created, packages and pods are installed, the app is built and run successfully on my iOS simulator. |
@caiorg in my case I had to disable Flipper for it to work I'm not using NX, just did a small POC in the early stages |
Yeah... I've also disabled it with no success, unfortunately. Outside a monorepo structure, it seams to work fine after running a few more commands. RNs documentation is not thorough. The only thing I'm suspicious is RN does not quite like monorepos, but I can't confirm right now. |
you can try the following (it's working for me):
|
Already looked into it. In newer versions of React Native, that line is already added. Also tried disabling Flipper, which was a solution for some. Not for me, unfortunately. |
@caiorg - The patch in Flipper pod worked for me. Is it possible you need to cd into ios, |
Sorry for the delay... Tested it without success. Tried everything I could find on the web about, found a few "solutions", none of them worked. Also for every test, I start from scratch. |
Are any updates? |
Unfortunately not from me and I'm kinda giving up. I feel like tested everything I could imagine or find on the internet. What makes me sad is that I haven't heard from any maintainer since I've open this issue. The only thing that kinda worked was:
But even that it is not working anymore, not sure why. A few things were CRUCIAL to make it work (when it was working... 😞) and they where steps 4 and 5, specially step 5 with the flag I really liked NX solution and hoped it would be a huge help on developing apps React Native, ReactJS and shared libraries (was looking forward to use React Native Web). I got so mentally tired trying every bit of solution I managed to find, that I'm not sure if this is worth pursuing anymore. |
Hi all! @caiorg found the solution that worked for me:
Hope it will help! |
I'll try that as soon as I can. Thx! |
Hey @oleksolv, sorry for the delay. I've tried your suggestion without success. Also tried on another MacBook Pro (exact same model as mine) and got the EXACT same error! |
I'm also facing the same thing... I hope there is a solution soon. |
Being honest? I just gave up the idea for now, as it was on a proof of concept stage and doesn't make sense spending more time right now. |
Current Behavior
iOS app not building even with freshly installed tools (node 20 via nvm or latest yarn via corepack).
When running
npx nx mobile:run-ios
(my project's name is 'mobile'), Metro starts and waits for app building process to complete.That's when the error happens. The app does not build and I get the error:
CompileC <REDACTED for privacy - HOME folder>/Library/Developer/Xcode/DerivedData/Mobile-dmgohxydoupmpaczzqhhcrpocyod/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FlipperKit.build/Objects-normal/arm64/FlipperPlatformWebSocket.o <REDACTED for privacy - HOME folder>/Development/Labs/shared-components-nx-monorepo/apps/mobile/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'FlipperKit' from project 'Pods')
Expected Behavior
Have the app built without errors, installed and executed in iOS simulator
GitHub Repo
No response
Steps to Reproduce
npx create-nx-workspace@latest <workspace-name>
1.1. Stack: React
1.2. Framework: React Native
1.3. Application Name: mobile
1.4. Nx Cloud: Skip for now
cd <workspace-name>
npx nx run mobile:pod-install
npx nx run mobile:run-ios
NOTES:
npx
foryarn dlx
)Nx Report
Failure Logs
Package Manager Version
npm 10.2.4 / yarn 4.1.1
Operating System
Additional Information
Found out about NX through the article One codebase for React and React-native with Nx monorepos.
Also tried following Getting started / Intro with React Native platform
BTW... there's another very similiar issue about this problem, issue #16910
The text was updated successfully, but these errors were encountered: