expo: Error when installing Expo modules

Summary

An attempt to install Expo modules failed due to the following guide: https://docs.expo.dev/bare/installing-expo-modules/

Automatic installation by npx install-expo-modules:

ramin [rnexpo]  → npx install-expo-modules
✔ Expo modules minimum iOS requirement is 12.0. This tool will change your iOS deployment target to 12.0. Do you want to continue? … yes
› Updating your project...
Uncaught Error Error: [android.mainActivity]: withAndroidMainActivityBaseMod: Unable to find ReactActivityDelegate new instance code block.
    at setModulesMainActivity (/Users/ramin/.npm/_npx/d80a5a2fd0b43bdc/node_modules/install-expo-modules/build/index.js:2:1423054)
    at /Users/ramin/.npm/_npx/d80a5a2fd0b43bdc/node_modules/install-expo-modules/build/index.js:2:1422000
    at action (/Users/ramin/.npm/_npx/d80a5a2fd0b43bdc/node_modules/install-expo-modules/build/index.js:2:1212818)
    at interceptingMod (/Users/ramin/.npm/_npx/d80a5a2fd0b43bdc/node_modules/install-expo-modules/build/index.js:2:1211282)
    at action (/Users/ramin/.npm/_npx/d80a5a2fd0b43bdc/node_modules/install-expo-modules/build/index.js:2:1188612)
    at async interceptingMod (/Users/ramin/.npm/_npx/d80a5a2fd0b43bdc/node_modules/install-expo-modules/build/index.js:2:1211276)
    at async evalModsAsync (/Users/ramin/.npm/_npx/d80a5a2fd0b43bdc/node_modules/install-expo-modules/build/index.js:2:1194978)
    at async Object.compileModsAsync (/Users/ramin/.npm/_npx/d80a5a2fd0b43bdc/node_modules/install-expo-modules/build/index.js:2:1193696)
    at async runAsync (/Users/ramin/.npm/_npx/d80a5a2fd0b43bdc/node_modules/install-expo-modules/build/index.js:2:1420141)
    at async /Users/ramin/.npm/_npx/d80a5a2fd0b43bdc/node_modules/install-expo-modules/build/index.js:2:1420561

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?

Android

SDK Version (managed workflow only)

5.3.1

Environment

  expo-env-info 1.0.2 environment info:
    System:
      OS: macOS 12.3.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.19.0 - ~/.nvm/versions/node/v14.19.0/bin/node
      npm: 8.5.4 - ~/.nvm/versions/node/v14.19.0/bin/npm
      Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
    IDEs:
      Android Studio: 2021.1 AI-211.7628.21.2111.8092744
      Xcode: 13.3/13E113 - /usr/bin/xcodebuild
    npmPackages:
      react: 17.0.2 => 17.0.2 
      react-native: 0.68.0 => 0.68.0 
    npmGlobalPackages:
      expo-cli: 5.3.1
    Expo Workflow: bare

Reproducible demo

npx react-native init myApp
cd myApp
npx install-expo-modules

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

thank you @Kudo ! That solved the problem. Best regards.

@felipejoribeiro that’s it. the latest version is 0.3.2. npx somehow cache the outdated version. i tried to cleanup npx cache last time i came across the issue.

what is the maximum rn version supported? and when will the new sdk be released?

sdk 45 is now available for beta release with react-native 0.68 support. the install-expo-modules is also updated for sdk 45 support. please try it and let us know if any issues found.

@uloco it seems

thanks. i’m closing this issue. if the new expo sdk doesn’t work for you then, please feel free to reopen or create a new issue.