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.

Error : Use of undeclared identifier 'YGValue' when building iOS

See original GitHub issue

Description

Hello,

I have the following error when building with the latest RN version.

I was just trying to upgrade… iScreen Shoter - 2022-06-08 10:29:49 688

Error :  Use of undeclared identifier 'YGValue' when building iOS

Version

0.69-RC.6

Output of npx react-native info

System: OS: macOS 12.2.1 CPU: (10) x64 Apple M1 Pro Memory: 1.71 GB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.19.1 - /usr/local/bin/node Yarn: 1.22.18 - /opt/homebrew/bin/yarn npm: 6.14.16 - /usr/local/bin/npm Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8309675 Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild Languages: Java: 11.0.15 - /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.0-rc.6 => 0.69.0-rc.6 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

I tried to upgrade…

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

N/A

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
karatekid430commented, Jun 23, 2022

Experiencing this with 0.69.0 release

7reactions
mfikcommented, Jun 23, 2022

So this has to do with case sensitive file systems. My drive says it isn’t, but i believe it was encrypted in the past. The temporary solution is to add this step to the build process, as mentioned : https://github.com/facebook/react-native/issues/33648

This really needs a fix tho, many hours lost by a lot of people.

rm -rf node_modules ios/Pods
yarn
sed -i -e "s/spec.module_name = 'yoga'/spec.module_name = 'Yoga'/g" node_modules/react-native/ReactCommon/yoga/Yoga.podspec
npx pod-install
expo run:ios
Read more comments on GitHub >

github_iconTop Results From Across the Web

use of undeclared identifier 'YGValue` on new expo 44 project
I'm running into a YGValue errors on both new and existing bare expo projects. I've tried variations of cocoapods (gem, homebrew), different versions...
Read more >
xcode - React native - Use of undeclared identifier ...
I just updated Xcode (to version 12.5 (12E262)) and got this error in my react native project.
Read more >
YGValue must be imported from module 'yoga' before it is ...
YGValue must be imported from module 'yoga' before it is required ... npx react-native run-ios you're getting a failed build with the error...
Read more >
iOS : Xcode "Use of undeclared identifier" errors ... - YouTube
iOS : Xcode " Use of undeclared identifier " errors, compiles/runs just fine [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] iOS...
Read more >
AppDelegate causes "undeclared identifier"error
Where exactly did you use the declaration ? You should try, in order: - do an option clean build folder. if not enough....
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