我试图建立从expo 管理的项目iOS应用程序(模拟器).在Pod安装步骤中,构建失败.
在expo SDK 44中,一切都很好.但当我升级到SDK 45甚至46时,我就面临着这个问题.
以下是来自EXPO服务器的一些日志(log):
Run Expo Doctor个
Running "expo doctor"
- Finding all copies of expo-modules-autolinking
- Finding all copies of @expo/config-plugins
[stderr]
[02:48:23] Expected package @expo/config-plugins@^5.0.0
[stderr]
[02:48:23] Found invalid:
[stderr]
[02:48:23] @expo/config-plugins@4.1.5
[stderr]
[02:48:23] (for more info, run: npm why @expo/config-plugins)
- Finding all copies of @expo/prebuild-config
- Finding all copies of @unimodules/core
- Finding all copies of @unimodules/react-native-adapter
- Finding all copies of react-native-unimodules
[stderr]
[02:48:28] Some dependencies are incompatible with the installed expo package version:
[stderr]
[02:48:28] - react - expected version: 18.0.0 - actual version installed: 17.0.2
[stderr]
[02:48:28] - react-dom - expected version: 18.0.0 - actual version installed: 17.0.2
[stderr]
[02:48:28] - react-native - expected version: 0.69.4 - actual version installed: 0.68.2
[stderr]
[02:48:28] Your project may not work correctly until you install the correct versions of the packages.
[stderr]
To install the correct versions of these packages, please run: expo doctor --fix-dependencies,
[stderr]
or install individual packages by running expo install [package-name ...]
[stderr]
[02:48:31] Warning: Invalid version react-native@0.68.2 for expo sdkVersion 46.0.0. Use react-native@0.69.4
Command "expo doctor" failed.
bash exited with non-zero code: 1
Install Pods个
Installing pods
Using Expo modules
Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/expo/.nvm/versions/node/v16.13.2/bin/node
Auto-linking React Native modules for target `Classima`: RNDateTimePicker, RNGestureHandler, RNReanimated, RNSVG, RNScreens, lottie-react-native, react-native-maps, react-native-netinfo, react-native-safe-area-context, react-native-slider, react-native-webview, and stripe-react-native
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
[!] CocoaPods could not find compatible versions for pod "RCT-Folly":
In snapshot (Podfile.lock):
RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
In Podfile:
RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
It seems like you've changed the version of the dependency `RCT-Folly` and it differs from the version stored in `Pods/Local Podspecs`.
You should run `pod update RCT-Folly --no-repo-update` to apply changes made locally.
Error: Compatible versions of some pods could not be resolved.
You are seeing this error because either:
- Versions in the Podfile.lock cached by EAS do not match required values for some of the libraries, it can be triggered when upgrading Expo SDK or any other library with native code. To fix that add the "cache.key" field (it can be set to any value) in the build profile in eas.json to invalidate the cache.
- Some of your npm packages have native code that depend on different versions of the same pod. Please see logs for more info.
Fail Build个
Build failed: Compatible versions of some pods could not be resolved.
You are seeing this error because either:
- Versions in the Podfile.lock cached by EAS do not match required values for some of the libraries, it can be triggered when upgrading Expo SDK or any other library with native code. To fix that add the "cache.key" field (it can be set to any value) in the build profile in eas.json to invalidate the cache.
- Some of your npm packages have native code that depend on different versions of the same pod. Please see logs for more info.