Skip to content
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

npx react-native init myapp && yarn ios -- results in BUILD FAILED #34876

Closed
denysonique opened this issue Oct 6, 2022 · 2 comments
Closed
Labels
Impact: Errors During Build Needs: Attention Issues where the author has responded to feedback. Platform: iOS iOS applications.

Comments

@denysonique
Copy link

denysonique commented Oct 6, 2022

Description

npx react-native init app fails to build with resulting output:

** BUILD FAILED **
The following build commands failed:
	CompileC /Users/dennis/Library/Developer/Xcode/DerivedData/myapp-diiznqhlbausysarsnhokwpbxdra/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Objects-normal/x86_64/FBReactNativeSpec-generated.o /tmp/myapp/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Version

0.70.2

Output of npx react-native info

System:
    OS: macOS 10.15.7
    CPU: (28) x64 AMD Ryzen 9 5950X 16-Core Processor
    Memory: 625.87 MB / 17.58 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 6.14.11 - ~/.nvm/versions/node/v14.16.0/bin/npm
    Watchman: 2022.08.29.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0
    react-native: 0.70.2 => 0.70.2
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

$ npx react-native init myapp
$ cd ./myapp && npx react-native run-ios

Snack, code example, screenshot, or link to a repository

$ npx react-native init myapp
$ cd ./myapp && npx react-native run-ios

build error:

``
Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-CoreModules.build/Objects-normal/x86_64/RCTKeyboardObserver.o


** BUILD FAILED **


The following build commands failed:
	CompileC /Users/dennis/Library/Developer/Xcode/DerivedData/myapp-diiznqhlbausysarsnhokwpbxdra/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Objects-normal/x86_64/FBReactNativeSpec-generated.o /tmp/myapp/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
@dmytrorykun
Copy link
Contributor

Hey @denysonique could you please clean /Users/dennis/Library/Developer/Xcode/DerivedData/, and then try to reproduce the issue.
If it persists, please attach full react-native run-ios output here.

@denysonique
Copy link
Author

denysonique commented Oct 6, 2022

@dmytrorykun

I did what you suggested and after more careful inspection it boils down to multiple instances of the following error:

In file included from /Users/dennis/dev/RNApp/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/Users/dennis/dev/RNApp/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2216:46: error: 'value' is unavailable: introduced in iOS 12.0
  d[@"window"] = window.has_value() ? window.value().buildUnsafeRawValue() : nil;

Which seems to be a duplicate of #34106.

However thank you for your time and trying to help me.

@denysonique denysonique closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2022
@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impact: Errors During Build Needs: Attention Issues where the author has responded to feedback. Platform: iOS iOS applications.
Projects
None yet
Development

No branches or pull requests

4 participants