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
iOS build failing on fresh react native project #35712
Comments
Its also worth noting that if I run pod install with this command Which is the same error I get when I run I have tried deleting derived data I even deleted node,cocoapods, watchman, and everything related to react native and did a new install Yet same issue |
I just tried using expo prebuild
› Planning build ❌ (node_modules/react-native/Libraries/Vibration/RCTVibration.mm:16:28) 14 | #import "RCTVibrationPlugins.h"
❌ (node_modules/react-native/Libraries/Vibration/RCTVibration.mm:33:20) 31 | }
❌ (node_modules/react-native/Libraries/Vibration/RCTVibration.mm:33:72) 31 | }
❌ (node_modules/react-native/Libraries/Vibration/RCTVibration.mm:35:27) 33 | - (std::shared_ptrfacebook::react::TurboModule)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params
› Compiling react-native Pods/React-RCTSettings » RCTSettingsManager.mm ❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:18:34) 16 | #import "RCTSettingsPlugins.h"
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:55:14) 53 | }
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:55:4) 53 | }
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:60:14) 58 | }
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:60:4) 58 | }
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:115:30) 113 | }
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:115:82) 113 | }
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:57:21) 55 | - (facebook::react::ModuleConstantsJS::NativeSettingsManager::Constants)constantsToExport
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:57:44) 55 | - (facebook::react::ModuleConstantsJS::NativeSettingsManager::Constants)constantsToExport
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:57:81) 55 | - (facebook::react::ModuleConstantsJS::NativeSettingsManager::Constants)constantsToExport
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:57:83) 55 | - (facebook::react::ModuleConstantsJS::NativeSettingsManager::Constants)constantsToExport
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:57:101) 55 | - (facebook::react::ModuleConstantsJS::NativeSettingsManager::Constants)constantsToExport
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:62:20) 60 | - (facebook::react::ModuleConstantsJS::NativeSettingsManager::Constants)getConstants
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:62:42) 60 | - (facebook::react::ModuleConstantsJS::NativeSettingsManager::Constants)getConstants
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:63:5) 61 | {
❌ (node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:117:37) 115 | - (std::shared_ptrfacebook::react::TurboModule)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params
› Compiling react-native Pods/React-RCTNetwork » RCTNetworking.mm ❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:27:30) 25 | NSString *const RCTNetworkingPHUploadHackScheme = @"ph-upload";
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:687:32) 685 | #pragma mark - JS API
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:734:30) 732 | }
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:734:82) 732 | }
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:691:22) 689 | {
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:692:19) 690 | NSDictionary *queryDict = @{
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:693:20) 691 | @"method": query.method(),
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:694:23) 692 | @"url": query.url(),
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:695:28) 693 | @"data": query.data(),
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:696:36) 694 | @"headers": query.headers(),
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:697:25) 695 | @"responseType": query.responseType(),
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:698:33) 696 | @"incrementalUpdates": @(query.incrementalUpdates()),
❌ (node_modules/react-native/Libraries/Network/RCTNetworking.mm:736:37) 734 | - (std::shared_ptrfacebook::react::TurboModule)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params
› Compiling react-native Pods/React-RCTNetwork » RCTNetworkPlugins.mm › 33 error(s), and 0 warning(s) CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65. |
I have the same issue, any update on this? |
As I have only ever used Expo to develop native apps, I have not idea what this means, however I managed to get passed this particular error as follows:
Notice how the header file was empty. Continued: I have also notice the .podspec file alongside it was also empty, so I have just copied the entire contents of the directory and I now have a successful build!
|
Same here: $ cat ./ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm ./ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h
$ In our setup (without expo) we don't have the
Interesting - you are not talking about |
Hello, I've been struggling my whole afternoon trying to run our app on iOS Simulator and it would not compile (same error message). I can confirm that I was able to successfully compile with the cp command: cp -R ios/build/generated/ios/out/FBReactNativeSpec/* ios/build/generated/ios/FBReactNativeSpec/
npx expo run:ios Thanks! |
I was having the same issue as above ( The solution that worked for me was to move the non-empty files like so:
|
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This is still an issue. |
Description
npm run android has been failing on a fresh react native project
Full Error Link
I have tried sooo many things none worked, I feel so helpless now
Version
0.70.6
Output of
npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 11.6.8
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 127.79 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
Yarn: Not Found
npm: 9.2.0 - ~/.nvm/versions/node/v18.12.1/bin/npm
Watchman: 2022.12.12.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/mac/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK:
API Levels: 28, 29, 31, 33
Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0, 33.0.0, 33.0.1
System Images: android-24 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-31 | Intel x86 Atom_64, android-31 | Google APIs Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.17 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.6 => 0.70.6
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Install a new project
npx react-native init Name
npm run iOS
Snack, code example, screenshot, or link to a repository
npx react-native init Name
The text was updated successfully, but these errors were encountered: