gpt4 book ai didi

ios - React Native 从 0.50.4 升级到 0.55.3 没有给出这样的文件或目录 Yoga.c 错误

转载 作者:行者123 更新时间:2023-12-01 19:44:18 25 4
gpt4 key购买 nike

我正在将我的 react native 项目从 0.50.4 升级到 o.55.3(最新)。更新后npm install我收到如下错误。

No such file or directory: '{PATH}/node_modules/reactnative/ReactCommon/yoga/yoga/Yoga.c'

我检查了文件目录,发现使用 0.52.0 以上的 react native 版本的项目有不同的文件 yoga 目录。请检查图像。(第一个 <0.52.0,第二个 >=0.52.0)

Before 0.52.0
After 0.52.0
如何解决最新 React Native 版本找不到文件 Yoga.c 的问题?

注意:我清理,重新安装 npm 模块,删除 IOS 文件夹中的构建并尝试......没有任何效果。

编辑
播客文件

# Uncomment the next line to define a global platform for your project
platform :ios, ‘9.0’

target 'ProjectName' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
#use_frameworks!

# Pods for ProjectName

pod 'Fabric'
pod 'Crashlytics'
pod 'RSKImageCropper'
pod 'QBImagePickerController'
pod 'FreshchatSDK'
pod 'Mixpanel'

pod 'React', :path => '../node_modules/react-native', :subspecs => [
'BatchedBridge'
]

pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# pod 'react-native-sqlite-storage', :path => '../node_modules/react-native-sqlite-storage'



pod 'RNShare', :path => '../node_modules/react-native-share'

pod 'TextToSpeech', :path => '../node_modules/react-native-tts'

pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

pod 'react-native-mixpanel', :path => '../node_modules/react-native-mixpanel'

end

最佳答案

您能否更新您的 Podfile,包括以下行,请删除当前的 yoga pods 规范。以下供您引用,也包括您现有的依赖项。

target 'Demo' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!

# Pods for Demo

rn_path = '../node_modules/react-native'

pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"


pod 'React', path: rn_path, subspecs: [
'Core',
'CxxBridge',
'DevSupport',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
]


pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

end

pod install再次,清理构建,删除派生数据并从 Xcode 运行 iOS 代码。

关于ios - React Native 从 0.50.4 升级到 0.55.3 没有给出这样的文件或目录 Yoga.c 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50289559/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com