【发布时间】:2019-11-15 18:18:03
【问题描述】:
当我尝试使用此 npx react-native init ProjectName 命令并出现以下错误时,无法安装 Cocoapods。 (MacOS Mojave 10.14.4)
⠙ Installing CocoaPods dependencies (this may take a few minutes)/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb:241:in `bin_path': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException)
from /usr/local/bin/pod:22:in `<main>'
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./AwesomeProject/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
请帮助了解正在发生的事情以及我们如何解决此问题。
【问题讨论】:
-
错误消息为您提供了应遵循的具体步骤。我假设您阅读了错误消息并按照它给您的说明进行操作,因为如果不尝试就先在这里询问会很愚蠢。结果如何?
-
你的 mac 上安装了 cocoapods 吗?
标签: ruby xcode react-native cocoapods