thecodingmachine / react-native-boilerplate

A React Native template for building solid applications 🐙, using JavaScript 💛 or Typescript 💙 (you choose).
https://thecodingmachine.github.io/react-native-boilerplate/
MIT License
4.75k stars 864 forks source link

[BUG]: Duplicate Podfile #344

Closed hungfhp closed 1 year ago

hungfhp commented 1 year ago

react-native environment setup

Description

When i init project with this template. It occur an error:

error warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/Podfile.

Screenshot 2023-03-22 at 14 17 34

Version

3.6.5

On which OS this issue appear on?

Desktop OS

Mac OS Ventuna 13.2

JeremyDolle commented 1 year ago

Yes I know, the same appear to me and I found this issue : https://github.com/facebook/react-native/issues/35801. I will investigate if it's caused by our template or the cli. Let me know if you find a solution in the previous link

farry19 commented 1 year ago
Screenshot 2023-03-24 at 6 54 12 AM

I am facing the same issue.

mkabatek commented 1 year ago

I'm having the same issue. Using the following thread: https://github.com/facebook/react-native/issues/35801

I did these steps.

  1. navigate to your app folder
  2. cd ios
  3. bundle install (you need to run this only once)
  4. bundle exec pod install

This give the following error.

[!] CocoaPods could not find compatible versions for pod "hermes-engine":
  In snapshot (Podfile.lock):
    hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)

  In Podfile:
    hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)

It seems like you've changed the version of the dependency `hermes-engine` and it differs from the version stored in `Pods/Local Podspecs`.
You should run `pod update hermes-engine --no-repo-update` to apply changes made locally.

Then I ran pod update hermes-engine --no-repo-update as suggested. Then I could run the project via xcode.

As a note you have to open the file MyApp\ios\MyApp.xcworkspace in xcode and set the team, otherwise you cannot run the app.

Screenshot 2023-03-26 at 7 31 21 PM