使用 M1 在 Mac 上正确设置反应原生(找不到正确答案)



我有一台MacBook Pro M1,我正试图用PyCharm启动一个React Native项目/WebStorm但是在以下问题中运行:

info Installing required CocoaPods dependencies
✔ CocoaPods (https://cocoapods.org/) is not installed. CocoaPods is necessary for the iOS project to run correctly. Do you want to install it? › Yes, with gem (may require sudo)
error 
/Users/nicolamacchitella/PycharmProjects/reactproject/node_modules/metro-hermes-compiler/src/emhermesc.js:77
throw ex;
^
RuntimeError: abort(Error: An error occured while trying to install CocoaPods, which is required by this template.
Please try again manually: sudo gem install cocoapods.
CocoaPods documentation: https://cocoapods.org/). Build with -s ASSERTIONS=1 for more info.
at process.abort (/Users/nicolamacchitella/PycharmProjects/reactproject/node_modules/metro-hermes-compiler/src/emhermesc.js:440:13)
at process.emit (node:events:390:28)
at emit (node:internal/process/promises:136:22)
at processPromiseRejections (node:internal/process/promises:242:25)
at processTicksAndRejections (node:internal/process/task_queues:97:32)
Node.js v17.0.1
Done

在我的M1 Macbook Pro上设置开发环境时,我也遇到了一些问题。

尝试运行:

sudo gem install cocoapods

如果它不工作,安装Homebrew,并运行:

brew install cocoapods

相关内容

  • 没有找到相关文章

最新更新