expo: errors installing Expo modules

Summary

install expo modules failed following guide :https://docs.expo.dev/bare/installing-expo-modules/

Automatic installation by ‘npx install-expo-modules’ error is :

[!] Invalid Podfile file: wrong number of arguments (given 2, expected 1).

I found it popped by https://github.com/expo/expo/blob/master/packages/expo-modules-autolinking/scripts/ios/autolinking_manager.rb line 45:

pod_options = { :path => podspec_dir_path, :testspecs => tests.include?(package.name) ? [‘Tests’] : [] }.merge(global_flags, package.flags)

It given 2 arguments when Hash merging.

My pod env is:

Stack

   CocoaPods : 1.10.1
        Ruby : ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-darwin20]
    RubyGems : 3.2.30
        Host : macOS 12.0.1 (21A559)
       Xcode : 13.1 (13A1030d)
         Git : git version 2.20.1
Ruby lib dir : /Users/byang/.rbenv/versions/2.5.8/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /Users/byang/.rbenv/versions/2.5.8/bin/pod

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

### Managed or bare workflow? If you have `ios/` or `android/` directories in your project, the answer is bare!

bare

### What platform(s) does this occur on?

iOS

### SDK Version (managed workflow only)

43.0.1

### Environment

### Stack

CocoaPods : 1.10.1 Ruby : ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-darwin20] RubyGems : 3.2.30 Host : macOS 12.0.1 (21A559) Xcode : 13.1 (13A1030d) Git : git version 2.20.1 Ruby lib dir : /Users/byang/.rbenv/versions/2.5.8/lib Repositories : trunk - CDN - https://cdn.cocoapods.org/


### Installation Source

Executable Path: /Users/byang/.rbenv/versions/2.5.8/bin/pod


### Plugins

cocoapods-deintegrate : 1.0.4 cocoapods-plugins : 1.0.0 cocoapods-search : 1.0.0 cocoapods-trunk : 1.5.0 cocoapods-try : 1.2.0

Reproducible demo or steps to reproduce from a blank project

install Expo modules in a existing project created with npx react-native init.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 21 (8 by maintainers)

Most upvoted comments

many thanks, it works after upgrading Ruby.