-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Error : Use of undeclared identifier 'YGValue' when building iOS #33976
Comments
Same! |
Related #33815 |
Hey @JB-CHAUVIN 👋 Would it be possible to add a sample or reproduction steps? The current |
The new error is for react-native-webview Package: { |
Also happening in an almost clean project. @JB-CHAUVIN Is this a priority issue? Haven't been able to build in since monday and i'm seeing a lot of related issues when i search. The error exists in Expo 43, 44 and 45 in multiple modules (safe-area-context, webview, Asynstorage). |
I am seeing the same error when updating my app to RN 0.69-rc6:
This seems to be different than #33648 as I dont have a case-sentitive FS (standard macOS APFS). |
Experiencing this with 0.69.0 release |
Hmm, I too have this error after update to 0.69.0 Output of npx react-native info
|
Also having this issue after upgrading from 0.68.2 to 0.69
|
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 : #33648 This really needs a fix tho, many hours lost by a lot of people.
|
I have the same problem but @mfik's workaround is not working for me. For some reason, the type error is fixed when I rename I had to change
diff --git a/node_modules/react-native/Libraries/Text/BaseText/RCTBaseTextShadowView.m b/node_modules/react-native/Libraries/Text/BaseText/RCTBaseTextShadowView.mm
similarity index 100%
rename from node_modules/react-native/Libraries/Text/BaseText/RCTBaseTextShadowView.m
rename to node_modules/react-native/Libraries/Text/BaseText/RCTBaseTextShadowView.mm
diff --git a/node_modules/react-native/Libraries/Text/React-RCTText.podspec b/node_modules/react-native/Libraries/Text/React-RCTText.podspec
index 793a8db..e324b03 100644
--- a/node_modules/react-native/Libraries/Text/React-RCTText.podspec
+++ b/node_modules/react-native/Libraries/Text/React-RCTText.podspec
@@ -26,7 +26,7 @@ Pod::Spec.new do |s|
s.author = "Facebook, Inc. and its affiliates"
s.platforms = { :ios => "12.4" }
s.source = source
- s.source_files = "**/*.{h,m}"
+ s.source_files = "**/*.{h,m,mm}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTText"
diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTInputAccessoryShadowView.m b/node_modules/react-native/Libraries/Text/TextInput/RCTInputAccessoryShadowView.mm
similarity index 83%
rename from node_modules/react-native/Libraries/Text/TextInput/RCTInputAccessoryShadowView.m
rename to node_modules/react-native/Libraries/Text/TextInput/RCTInputAccessoryShadowView.mm
index 8322bfc..47d6b5a 100644
--- a/node_modules/react-native/Libraries/Text/TextInput/RCTInputAccessoryShadowView.m
+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTInputAccessoryShadowView.mm
@@ -14,7 +14,7 @@ @implementation RCTInputAccessoryShadowView
- (void)insertReactSubview:(RCTShadowView *)subview atIndex:(NSInteger)atIndex
{
[super insertReactSubview:subview atIndex:atIndex];
- subview.width = (YGValue) { RCTScreenSize().width, YGUnitPoint };
+ subview.width = (YGValue) { static_cast<float>(RCTScreenSize().width), YGUnitPoint };
}
@end I've added my changes to #34064 For completeness, I had to edit also diff --git a/node_modules/react-native-safe-area-context/ios/RNCSafeAreaShadowView.m b/node_modules/react-native-safe-area-context/ios/RNCSafeAreaShadowView.mm
similarity index 88%
rename from node_modules/react-native-safe-area-context/ios/RNCSafeAreaShadowView.m
rename to node_modules/react-native-safe-area-context/ios/RNCSafeAreaShadowView.mm
index 1597bc8..1394e33 100644
--- a/node_modules/react-native-safe-area-context/ios/RNCSafeAreaShadowView.m
+++ b/node_modules/react-native-safe-area-context/ios/RNCSafeAreaShadowView.mm
@@ -116,16 +116,16 @@ - (void)updateInsets
if (mode == RNCSafeAreaViewModePadding) {
[self extractEdges:_paddingMetaProps top:&top right:&right bottom:&bottom left:&left];
- super.paddingTop = (YGValue){insetTop + top, YGUnitPoint};
- super.paddingRight = (YGValue){insetRight + right, YGUnitPoint};
- super.paddingBottom = (YGValue){insetBottom + bottom, YGUnitPoint};
- super.paddingLeft = (YGValue){insetLeft + left, YGUnitPoint};
+ super.paddingTop = (YGValue){static_cast<float>(insetTop + top), YGUnitPoint};
+ super.paddingRight = (YGValue){static_cast<float>(insetRight + right), YGUnitPoint};
+ super.paddingBottom = (YGValue){static_cast<float>(insetBottom + bottom), YGUnitPoint};
+ super.paddingLeft = (YGValue){static_cast<float>(insetLeft + left), YGUnitPoint};
} else if (mode == RNCSafeAreaViewModeMargin) {
[self extractEdges:_marginMetaProps top:&top right:&right bottom:&bottom left:&left];
- super.marginTop = (YGValue){insetTop + top, YGUnitPoint};
- super.marginRight = (YGValue){insetRight + right, YGUnitPoint};
- super.marginBottom = (YGValue){insetBottom + bottom, YGUnitPoint};
- super.marginLeft = (YGValue){insetLeft + left, YGUnitPoint};
+ super.marginTop = (YGValue){static_cast<float>(insetTop + top), YGUnitPoint};
+ super.marginRight = (YGValue){static_cast<float>(insetRight + right), YGUnitPoint};
+ super.marginBottom = (YGValue){static_cast<float>(insetBottom + bottom), YGUnitPoint};
+ super.marginLeft = (YGValue){static_cast<float>(insetLeft + left), YGUnitPoint};
}
}
|
Thanks @ph4r05 this indeed makes the build move forward for me (case-insensitive FS as well). But it fails a bit later with:
Once this file has been renamed to
It seems to be the same kind of error. Might it be that those This would explain why it does not happen on a newly created app, and I am hitting more of those than you. |
@renchap great it works for you as well! The patch renames |
I missed your It now compiles correctly with your 2 patches 🎉 |
same question after install expo |
Summary: Fixes iOS build for React-RCTText with RN 0.69.0, fixes #33976 PR contains changes from #33976 (comment) PoC repo: https://github.com/ph4r05/poc-rn-34064 Related issues: - expo/expo#16283 - #33815 - #33976 ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [Fixed] - Fix build for React-RCTText Pull Request resolved: #34064 Reviewed By: cortinico Differential Revision: D37420163 Pulled By: cipolleschi fbshipit-source-id: 68a831bce9f449348d13e040a1ba12726a66667d
I have a similar issue.
So I renamed EXUpdatesFileDownloader.m to EXUpdatesFileDownloader.mm After renaming the affected file in my own case, I am getting an error:
Did you run patch-package first before running build iOS command again? |
I solved the new error by running pod deintegrate, and pod install. However, this led to more errors in the code after running 'npm run ios' command. Any fix for this yet? |
Description
Hello,
I have the following error when building with the latest RN version.
I was just trying to upgrade...
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
The text was updated successfully, but these errors were encountered: