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.

On a case-sensitive filesystem, React Native fails to build

See original GitHub issue

Description

Some issues with building yoga were discovered while using expo: https://github.com/expo/expo/issues/16283 but the root cause is in the way the Yoga pod is installed.

The build failure has the error

Use of undeclared identifier 'YGValue`

On a case-sensitive filesystem, the symlinks Yoga-umbrella.h and Yoga.modulemap are created in ios/Pods/Headers/Public/yoga instead of ios/Pods/Headers/Public/Yoga (note the case of yoga), which causes the build failure.

If I change https://github.com/facebook/react-native/blob/main/ReactCommon/yoga/Yoga.podspec#L30 from 'yoga' to 'Yoga', everything builds fine.

Version

0.63.0

Output of npx react-native info

$ npx react-native info                                                                                                                                                                                                                                                                                                                                      info Fetching system and libraries information...
System:
    OS: macOS 12.3
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 883.43 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.22.11 - ~/.volta/tools/image/node/12.22.11/bin/node
    Yarn: 1.22.18 - ~/.volta/tools/image/yarn/1.22.18/bin/yarn
    npm: 6.14.16 - ~/.volta/tools/image/node/12.22.11/bin/npm
    Watchman: 2022.03.21.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /Users/tngacker/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.3
      System Images: android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8193401
    Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.14 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.3 => 0.64.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

I believe this happens on multiple versions of react native, see https://github.com/expo/expo/issues/16283

I can follow up again if necessary.

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

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
emillercommented, May 17, 2022

Same issue for us (pretty painful timesink). We are working around it by simply having a step after yarn and before pod installs:

sed -i -e "s/spec.module_name = 'yoga'/spec.module_name = 'Yoga'/g" node_modules/react-native/ReactCommon/yoga/Yoga.podspec
0reactions
kelsetcommented, Jun 23, 2022

If I change https://github.com/facebook/react-native/blob/main/ReactCommon/yoga/Yoga.podspec#L30 from ‘yoga’ to ‘Yoga’, everything builds fine.

I’m not sure why noone made a PR to do this fix before now, but I went ahead and made one: https://github.com/facebook/react-native/pull/34058 so that at least we can test that it’s actually that and there are no other side effects

Read more comments on GitHub >

github_iconTop Results From Across the Web

npx react-native run-ios doesn't work after initializing the project
In my case the issue was the case sensitive file system. You can search in terminal for fatal error: 'openssl/opensslv.h' file not found...
Read more >
[Support Guide] Netlify app builds locally but fails on deploy ...
The file system used in Netlify builds is case sensitive, while your local environment is not. Unfortunately, the error messages that result may...
Read more >
The Curious Case of Git, macOS Filesystem ... - Spektor?.dev
The Curious Case of Git, macOS Filesystem and Case Sensitivity ... I deployed but the build failed again . This time the error...
Read more >
HowTo: Handle case sensitive file system on Mac OS
Repartition the entire hard drive with case sensitivity turned on. · Create a new partition and re-format only this new partition with the...
Read more >
How do I resolve a 'module not found' error? - Vercel
One possible cause for this issue is the fact that some filesystems are case-insensitive, however Vercel deployments use a case-sensitive filesystem.
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