小编mur*_*rty的帖子

如何使用 Rosetta 在 Mac 上解决“react-native”和 cocopods 的错误

我正在尝试使用应用程序芯片在新的 Mac 计算机上执行反应本机项目。按照某些论坛的建议,将终端更改为使用 Rosetta 打开

使用 NPM 14.16.0 安装了 cocoa pods 1.10.1 版本并反应 Native 版本 0.63.4 和 Xcode 版本 12.4 并尝试在 iOS 文件夹中运行 pod install 命令。我收到以下错误。

错误

[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `react_native_post_install' for #<Pod::Podfile:0x00000001572d90f8>

/Users/vvvvv/WebstormProjects/Reer/ios/Podfile:27:in `block (3 levels) in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/podfile.rb:179:in `post_install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:897:in `run_podfile_post_install_hook'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:885:in `block in run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:145:in `message'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:884:in `run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:329:in `block (2 levels) in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:328:in `block in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:307:in `create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:299:in `generate_pods_project' …
Run Code Online (Sandbox Code Playgroud)

macos rosetta cocoapods react-native

6
推荐指数
1
解决办法
7999
查看次数

标签 统计

cocoapods ×1

macos ×1

react-native ×1

rosetta ×1