1

I have a MacBook Pro M1 and I am trying to start a React Native project with PyCharm/WebStorm but running in the following issue:

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
LazyOne
  • 158,824
  • 45
  • 388
  • 391
giaggi
  • 542
  • 5
  • 16

1 Answers1

0

I also running some issues at first while to setup the development environment on my M1 Macbook Pro.

Try to run:

sudo gem install cocoapods

If it doesn't work, install Homebrew, and run:

brew install cocoapods
hisam
  • 1,566
  • 1
  • 7
  • 21