Open caiorg opened 6 months ago
Nothing yet? I know you guys are very busy, but if you can shine a light would be great! I'm also trying to find a solution on my own, with no success so far.
I'm facing a similar error but I'm not using NX Not sure if this is related with it or not but will update as soon as I get more info
@caiorg have you seen this? https://github.com/facebook/react-native/issues/43335
@helloiambguedes
@caiorg have you seen this? facebook/react-native#43335
Just looked at it and still no success.
The weird thing is I can it to work OUTSIDE a monorepo/workspaces folder with:
npx react-native@latest init appName
in a non-monorepo project (let's as plain as it can get),cd ios
folder,bundle exec pod install
,npm run ios
or yarn ios
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 But if you can run it outside the monorepo maybe it has something to do with NX's magic
I'm not using NX, just did a small POC in the early stages I'm sorry I can't give much help here ๐
@caiorg in my case I had to disable Flipper for it to work But if you can run it outside the monorepo maybe it has something to do with NX's magic
I'm not using NX, just did a small POC in the early stages I'm sorry I can't give much help here ๐
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):
We had similar issue when updating xCode to 15.3 version. The issue was associated with Flipper as well.
The issue was with FlipperTransportTypes.h file. the issue throws No template named 'function' in namespace 'std'
The Fix was adding #include
after #include statement. If you still have issues after that than you might need to add it to some other files.
This will solve your problem.
you can try the following (it's working for me):
We had similar issue when updating xCode to 15.3 version. The issue was associated with Flipper as well. The issue was with FlipperTransportTypes.h file. the issue throws No template named 'function' in namespace 'std' The Fix was adding #include after #include statement. If you still have issues after that than you might need to add it to some other files. This will solve your problem.
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, pod deintegrate && pod install
? I wonder if you have some lingering caches hanging around. Might want to delete your metro and .nx caches as well.
@caiorg - The patch in Flipper pod worked for me. Is it possible you need to cd into ios,
pod deintegrate && pod install
? I wonder if you have some lingering caches hanging around. Might want to delete your metro and .nx caches as well.
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? I have same problem
Are any updates? I have same problem
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:
npm install
cd
ing into ios
folderbundle install
NO_FLIPPER=1 pod install
or NO_FLIPPER=1 bundle exec pod install
npx nx run-ios <rn app name>
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 NO_FLIPPER=1
.
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!
Hi all!
@caiorg found the soilution that worked for me:
- Clear the project: git clean -fdx.
- Clear all caches: pod, watchman, react-native, etc.
- Update react-native to the latest version: 0.73.6 (After nx generate it was 0.73.2). React Native Upgrade Helper.
- Please note that CocoaPods version should be less than 0.15 ๐. I use version 0.14.3. In the rn update guide, you will see the bug note.
- Then common steps: npm i, pod install.
- Try running iOS again.
Hope it will help!
I'll try that as soon as I can. Will come back with the results.
Thx!
Hi all!
@caiorg found the solution that worked for me:
- Clear the project: git clean -fdx.
- Clear all caches: pod, watchman, react-native, etc.
- Update react-native to the latest version: 0.73.6 (After nx generate it was 0.73.2). React Native Upgrade Helper.
- Please note that CocoaPods version should be less than 0.15 ๐. I use version 0.14.3. In the rn update guide, you will see the bug note.
- Then common steps: npm i, pod install.
- Try running iOS again.
Hope it will help!
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!
The solution is already mentioned in the comments in podfile
The solution is already mentioned in the comments in podfile
That would be the solution IF react-native-flipper
was being used, as the comment states. Since the only 4 times react-native-flipper
appears in the whole codebase (considering a freshly created project) is exactly in those comment lines, that solution is not applicable, also that reinforces the need to use NO_FLIPPER=1.
In my screenshot, the line 20 is not commented out and I did not touch at all this file.
Anyways, I really appreciate you taking your time and trying to help!
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. Also the fact that no NX contributor has ever commented something here, shows this matter is of a low criticality for them (if they even took time to read) and is discouraging.
Had the same issue this solved it for me:
on FlipperTransportTypes.h file
adding #include
Are any updates? I have same problem
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:
- starting a fresh workspace with RN template (as instructed by the docs)
npm install
cd
ing intoios
folderbundle install
NO_FLIPPER=1 pod install
orNO_FLIPPER=1 bundle exec pod install
- back to root folder
- finally
npx nx run-ios <rn app name>
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
NO_FLIPPER=1
.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.
Forked for me, thank you.
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 nowcd <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