react-native-gesture-handler: undefined method `install_dependencies' for Pod:Module

Description

When i am using pod install command getting below error:

[!] Invalid `Podfile` file: 
[!] Invalid `RNGestureHandler.podspec` file: undefined method `install_dependencies' for Pod:Module
Did you mean?  instance_exec.

 #  from /Users/XXXX/Documents/MyApps/OK_RN/node_modules/react-native-gesture-handler/RNGestureHandler.podspec:48
 #  -------------------------------------------
 #    else
 >      install_dependencies(s, new_arch_enabled)
 #    end
 #  -------------------------------------------

Steps to reproduce

  1. npm i
  2. cd ios
  3. arch -x86_64 pod install

Snack or a link to a repository

xx

Gesture Handler version

2.9.0

React Native version

0.68.2

Platforms

iOS

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Reactions: 4
  • Comments: 19 (3 by maintainers)

Commits related to this issue

Most upvoted comments

TEMPORARY SOLUTION:

  1. Change your version to 2.9.0 (without the ^)
  2. Delete node_modules & package-lock.json
  3. run npm i && cd ios/ && pod install

package.json "react-native-gesture-handler": "2.9.0",

Hi! If you experience this issue try to follow steps suggested by @benminor. Sometimes reinstalling node_modules helps and I wouldn’t call it “temporary solution”. Also, removing ^ from version in package.json shouldn’t matter.

So if you see this problem, try reinstalling node_modules and then cd ios && pod install. You can also try deleting pods before doing pod install: cd ios and rm -rf Pods Podfile.lock

Let me know if it helps!

Experienced the same issue today. I noticed the only difference between one of our working react-native app projects and the failing one was that the error occured when upgrading to latest "react-native-gesture-handler": "2.13.3".

Solution:

  1. Set version to 2.13.2 in package.json
  2. run npm i && ios/ && pod install

try using “react-native-gesture-handler”: “^1.8.0”, it works for me

This works for me, still it should be a temporary solution, undefined method 'install_dependencies' for Pod:Module problem should be fixed with the latest version of react-native-gesture-handler.

try using “react-native-gesture-handler”: “^1.8.0”, it works for me