Using Expo modules
[!] Invalid `Podfile` file: undefined method `exists?' for File:Class.
# from /Users/ameen/Documents/development/react_native/admin-app/ios/Podfile:11
# -------------------------------------------
# target 'app_admin' do
> use_expo_modules!
# post_integrate do |installer|
# -------------------------------------------
Couldn't install Pods. Updating the Pods project and trying again...
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file: undefined method `exists?' for File:Class.
# from /Users/ameen/Documents/development/react_native/admin-app/ios/Podfile:11
# -------------------------------------------
# target 'app_admin' do
> use_expo_modules!
# post_integrate do |installer|
# -------------------------------------------
see: `pod install` fails with `use_expo_modules!` · Issue #20707 · expo/expo · GitHub
basically - a new ruby version removed exists?' for
File:Class, which was used in a couple places in expo modules. we moved away from that method in
expo@47.0.13`. you can either downgrade ruby or install that version. likely what happened is you upgraded the ruby version on your machine.
Do which version of ruby should I downgrade?
It works after I ran brew uninstall cocoapods
. Didn’t understood what happend, but it works. Can someone explain what was wrong?
homebrew likely installed a new version of ruby (3.2+) for cocoapods. ruby 3.1 and lower will work with File.exists?
.
the best solution is to update the expo package. see the github issue i linked to for more context `pod install` fails with `use_expo_modules!` · Issue #20707 · expo/expo · GitHub