question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RN [0.61.3 to 0.62.2] - After Flipper Installation - XCode 11: 'cstdarg' file not found Could not build module 'Darwin' Could not build module 'Foundation' etc.

See original GitHub issue

Environment

System: OS: macOS Mojave 10.14.6 CPU: (4) x64 Intel® Core™ i5-4308U CPU @ 2.80GHz Memory: 102.59 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.19.0 - /usr/local/opt/node@10/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.13.4 - /usr/local/opt/node@10/bin/npm Watchman: 4.9.4 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.3 - /Users/pritam/.rbenv/versions/2.7.1/bin/pod SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: API Levels: 25, 28, 29 Build Tools: 27.0.3, 28.0.3, 29.0.2 System Images: android-28 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild Languages: Java: 1.8.0_191 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.2 => 0.62.2 npmGlobalPackages: react-native: Not Found

Upgrading version

Upgraded from V 0.61.3 to 0.62.2

Description

After upgrading to react native 0.62.2 , Added Flipper dependency in Podfile. Pods are getting installed successfully. I have followed all the steps from this link https://github.com/react-native-community/upgrade-support/issues/13

Error: I’m getting errors when trying to build the project in XCode 11: ‘cstdarg’ file not found Could not build module ‘Darwin’ Could not build module ‘Foundation’ etc.

Screenshot 2020-06-02 at 4 13 53 PM copy

Reproducible demo

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:14

github_iconTop GitHub Comments

4reactions
rafaeltakahashicommented, Oct 15, 2020

I don’t know if this will work for others, but in my case the problem stopped after I manually edited my pbxproj file (inside the .xcodeproj directory) to remove the HEADER_SEARCH_PATHS fields (which is different than having it present with a value of “”). I had edited this field in the past, and I suppose that prevents Xcode from using the default values generated when installing pods (I’m not sure).

I’m sharing what I found as a reproducible demo:

  • Create a brand new react-native project (I’m using 0.63.3), and notice that the generated .pbxproj file (located inside the .xcodeproj directory) doesn’t contain the HEADER_SEARCH_PATHS field anywhere.
  • Open the project in Xcode and edit the Build Setting “Header Search Paths”, replacing all the paths that contain “${PODS_ROOT}/Header/Public” with a single recursive “${PODS_ROOT}/Header/Public” (which in theory should be the same).
  • Clean the project, then build; this error happens.
  • Open the .pbxproj file in a text editor, and manually delete all lines with “HEADER_SEARCH_PATHS”.
  • Open Xcode and notice that the “Header Search Paths” setting contains the original values again, and the project builds.
3reactions
MikePendocommented, Oct 24, 2021

Having the Same issue after upgrading from 63 to 64 Solved it by: 1.Setting Dead Code Stripping to YES (in TARGET ) 2. In Header Search Path made “${PODS_ROOT}/Headers/Public” - non recursive WTF

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not build module 'Darwin' er… | Apple Developer Forums
I worked on my own project (a simple command line in C). after that, I was trying to compile the xnu source code...
Read more >
React-Native: Could not build module 'Darwin' after upgrading ...
My working solution for this is to create a new, clean project with the version you want to upgrade to. Afterwards do following...
Read more >
Compilation Error for 6.22 on Mac - ROOT Forum
When I try to compile ROOT 6.22.02, I get the following compilation ... fatal error: could not build module 'Darwin' #include_next <ctype.h> ...
Read more >
upgrade-support [0.59.10 to 0.62.2] Library not found for ...
Ld /Users/vincent/Library/Developer/Xcode/DerivedData/myproject-chcyphcsxklmejbgcaennhctwkux/Build/Products/Debug-iphonesimulator/myproject.app/myproject ...
Read more >
microsoft learning paths : access for guest users? - Pnp/Custom ...
RN [0.61.3 to 0.62.2] - After Flipper Installation - XCode 11: 'cstdarg' file not found Could not build module 'Darwin' Could not build...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found