What are the latest installation instructions for Apple M1 Macbook Pro? (this works just fine on Ventura Intel)
I've tried several things and can't get the basic
npx react-native init mainapp
✔ Downloading template
✔ Copying template
✔ Processing template
✖ Installing CocoaPods dependencies (this may take a few minutes)
✖ 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 ./mainapp/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
then changing to the ios folder and issuing "pod install" yields:
Fetching podspec for hermes-engine from ../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec
[!] Failed to load 'hermes-engine' podspec:
[!] Invalid hermes-engine.podspec file: undefined method `exists?' for File:Class.
from mainapp/node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec:46
VERSIONS
pod --version
1.11.3
node -v
v19.4.0
npm -v
9.2.0
npx -v
9.2.0
yarn -v
1.22.19
ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin21]
(yet in /Library/Ruby/Gems/2.6.0/ is listed?)
Related
I ran "npx react-native init Test"
Downloading template
✔ Copying template
✔ Processing template
ℹ Installing 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 Homebrew
✔ Installing CocoaPods
✖ Installing CocoaPods dependencies (this may take a few minutes)
✖ 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.
but CocoaPods is installed:
pod --version returns 1.11.3
react-native version is 8.0.6
If you are using M1 or up processor, try updating ruby and again install cocoapods or you can go into iOS folder and do pod install
I possible please share whole error from terminal.
Thanks :)
I'm on a Mac mini with Monterey OS trying to init a react-native app.
npx react-native init AwesomeProject
gives me:
✔ Downloading template
✔ Copying template
✔ Processing template
✖ Installing CocoaPods dependencies (this may take a few minutes)
✖ 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/
when I try
cd ./AwesomeProject/ios && pod install
I get:
664 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/ffi.rb
665 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: https://www.ruby-lang.org/bugreport.html
[IMPORTANT]
Don't forget to include the Crash Report log file under
DiagnosticReports directory in bug reports.
zsh: abort pod install
Is anyone else encountering the same problem?
EDIT:
Uninstalled and re-installed Ruby and Cocoapods.
This was a helpful post
and used:
arch -x86_64 pod install
Using that processor does bring some issues with installing pods. Please try arch -x86_64 pod install and see what it brings.
Link to some older post:
React Native ios builds failing suddenly
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
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
Anyone #with help on how to setup #reactnative #ide on #M1Macbookpro? Tried a number of YouTube tutorials but my problem begins when I start running "npx react-native init " and have problems installing cocoapods, even when I cd > install #dev #vscode
Followed the react native official installation guide all to no avail. Tried running terminal in rosetta to install cocoapods but still no results. Any help?
This is the error:
✔ Downloading template
✔ Copying template
✔ Processing template
✖ Installing CocoaPods dependencies (this may take a few minutes)
✖ 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 ./AwesomeProject07/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
try to run pod install with this command
sudo arch -x86_64 pod install
also run this command too
sudo arch -x86_64 gem install ffi
error Could not find "Podfile.lock" at projects\reactNative\ios\Podfile.lock. Did you run "pod install" in iOS directory?
(node:11696) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
error Could not get the simulator list from Xcode. Please open Xcode and try running project directly from there to resolve the remaining issues. Run CLI with --verbose flag
Issue 1
For fixing the issue:
Could not find "Podfile.lock" at projects\reactNative\ios\Podfile.lock. Did you run "pod install" in iOS directory?
Please make sure you have install cocoapods and run this command at your project root:
gem install cocoapods // If you haven't install cocoapods
cd ios && pod install && cd ..
Issue 2
For fixing the issue:
(node:11696) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created)
Please downgrade your node.js version to v13.x.x, one of the solutions below:
npm install -g n
sudo n 13.13.0
Issue 3
For fixing the issue:
Could not get the simulator list from Xcode. Please open Xcode and try running project directly from there to resolve the remaining issues. Run CLI with --verbose flag
Please make sure you have installed Xcode correctly from App Store and use the latest React Native version in your project (should be v0.62.2 now for stable). If still cannot open the project, please try to add some simulator in Xcode's developer settings.
Cheers!
you did not install cocoapods
install cocoapods commands
sudo gem install cocoapods
after that in react native directory
cd ios && pod install && cd ../ && react-native run-ios
CocoaPods manages library dependencies for your Xcode projects. We need it to setup the iOS project. Like yarn
sudo gem install cocoapods
The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects. Like package.json
access to the folder with Podfile, run
pod install
This will resolve the code of those dependency framework, and generate Pods.xcodeproj for your iOS project.