我正在创建一个 React Native 项目并收到此错误。
Downloading template
error Installing pods failed. This doesn't affect project initialization and you can safely proceed.
However, you will need to install pods manually when running iOS, follow additional steps in "Run instructions for iOS" section.
info 💡 To enable automatic CocoaPods installation when building for iOS you can create react-native.config.js with automaticPodsInstallation field.
For more details, see https://github.com/react-native-community/cli/blob/main/docs/projects.md#projectiosautomaticpodsinstallation
Run instructions for Android:
• Have an Android emulator running (quickest way to get started), or a device connected.
• cd "/Users/khuongtai/Downloads/AwesomeProject" && npx react-native run-android
Run instructions for iOS:
• cd "/Users/khuongtai/Downloads/AwesomeProject/ios"
• Install Cocoapods
• bundle install # you need to run this only once in your project.
• bundle exec pod install
• cd ..
• npx react-native run-ios
- or -
• Open AwesomeProject/ios/AwesomeProject.xcodeproj in Xcode or run "xed -b ios"
• Hit the Run button
Run instructions for macOS:
• See https://aka.ms/ReactNativeGuideMacOS for the latest up-to-date instructions.
我检查了文件夹,里面是空的。我真的不知道我如何尝试使用旧版本,但它仍然发生。
那么有什么办法可以解决吗?
似乎有一个特定于 0.75.0 的临时“问题”。使用以前的版本对我有用:npx react-native init MyNewProject --version 0.74.4