Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running pod install in the ios directory. #2620

Closed
2lach opened this issue Jan 31, 2024 · 3 comments
Closed

Error when running pod install in the ios directory. #2620

2lach opened this issue Jan 31, 2024 · 3 comments
Labels

Comments

@2lach
Copy link

2lach commented Jan 31, 2024

Describe the bug

Error when running pod install -> Error installing hermes-engine

Something went wrong running pod install in the ios directory.
Command pod install failed -> Cause: Error installing hermes-engine

Description:

first i ran:
npx ignite-cli@latest new zlazhpush

choosen options:

✅ What bundle identifier? · com.stefanpush
✅ Where do you want to start your project? ·/my/paths/to/projects/testproject/zlazhpush
✅ Do you want to use Expo? · Expo
✅ Which Expo workflow? (You can switch between them later with a little work -- here's how: https://ignitecookbook.com/docs/recipes/SwitchBetweenExpoGoCNG) · Expo CNG

✅ Do you want to initialize a git repository? (Y/n) · Yes
✅ Remove demo code? We recommend leaving it in if it's your first time using Ignite (y/N) · Yes
✅ Which package manager do you want to use? · npm
✅ Do you want to install dependencies? (Y/n) · No
✅ ❗EXPERIMENTAL❗Would you like to enable the New Architecture? (y/N) · No

then
npm install (succesfully)
npm run ios

at this point i received a build error

Expected Behavior:
I expected my IPhone (virtual from XCode) to render the start application

Actual Behavior:
Error

✔ Config synced
⚠️  Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: Error installing hermes-engine

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

/my/path/.gem/ruby/3.2.2/bin/pod install --repo-update --ansi



Environment:





### Ignite version

9.4.2

### Additional info

```bash
System
  platform           darwin
  arch               arm64
  cpu                8 cores      Apple M3
  directory          zlazhpush   /my/paths/to/projects/testproject/zlazhpush

JavaScript (and globally-installed packages)
  node               18.16.1      /my/paths/to/Library/Caches/fnm_multishells/54304_1706729940241/bin/node
  npm                9.5.1        /my/paths/to/Library/Caches/fnm_multishells/54304_1706729940241/bin/npm
    npm              9.5.1
  yarn               1.22.21      /opt/homebrew/bin/yarn
    ios-deploy       1.12.2
  pnpm               -            not installed
  bun                -            not installed
  expo               49.0.22      managed

Ignite
  ignite-cli         9.4.2        /my/paths/to/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite
  ignite src         build        /my/paths/to/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build

Android
  java               1.8.0_391    /usr/bin/java
  android home       -            undefined

iOS
  xcode              15.2
  cocoapods          1.15.0       /my/paths/to/.gem/ruby/3.2.2/bin/pod

Tools
  git                git version 2.43.0   /opt/homebrew/bin/git
@2lach 2lach added the bug label Jan 31, 2024
@2lach
Copy link
Author

2lach commented Jan 31, 2024

Enviroment:

neofetch

Log:
xcodebuild.log

@2lach
Copy link
Author

2lach commented Jan 31, 2024

This was not an Ignite issue it is a Cocoapods issue when using a mac with a M1,2,3 chip

here is how i resolved it:

  1. Open terminal
  2. Type: gem list
  3. In my case, the list that resulted had all this:
cocoapods (1.10.2)
cocoapods-core (1.10.2)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
cocoapods-try (1.2.0)
  1. From that list, uninstall everything that references 'cocoapods'. Do this by typing the following for each 'cocoapods' reference you see: sudo gem uninstall cocoapods-core
  2. Install homebrew.
  3. Update homebrew: brew upgrade
  4. Using homebrew, install Ruby brew install rbenv ruby-build
  5. Update ruby: rbenv install 3.2.0
  6. Set the new ruby version to global: rbenv global 3.2.0
  7. add eval "$(rbenv init - zsh)"to your .zshrc
  8. Restart your computer.
  9. sudo gem uninstall cocoapods
  10. sudo arch -arm64 gem install -n /usr/local/bin cocoapods -v 1.14.3

links:
https://forum.unity.com/threads/cocoapods-installation-failure-when-building-for-ios.1167700/#post-8793733
CocoaPods/CocoaPods#12226

@markrickert
Copy link
Member

Thanks for posting the solution here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants