question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when installing Expo modules

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
felipejoribeirocommented, May 2, 2022

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

2reactions
Kudocommented, May 2, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

errors installing Expo modules · Issue #14985 - GitHub
Automatic installation by 'npx install-expo-modules' error is : [!] Invalid Podfile file: wrong number of arguments (given 2, expected 1).
Read more >
Can't run "npm install expo-cli --global" - Stack Overflow
The problem was solved by installing expo-cli with yarn package manager and the command below: sudo yarn global add expo-cli .
Read more >
Common development errors - Expo Documentation
A list of common development errors that are encountered by developers using Expo.
Read more >
install-expo-modules - npm
Tools to install expo-modules for existing react-native projects. Latest version: 0.3.9, last published: 2 months ago.
Read more >
failed to install expo package with error: yarnpkg exited with ...
Try deleting yarn.lock file & .expo folder and try running expo upgrade again. It worked for me upgrading expo from 44 -> 45....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found