Skip to content

@expo/metro-config can't find expo-asset with pnpm #2150

@byCedric

Description

@byCedric

Summary

EAS CLI executes the @expo/cli in an interesting way, which seems incompatible with isolated modules. TL;DR;

  • When EAS CLI needs to execute the Expo CLI, it fully resolves the path to the binary.
  • When the binary path is resolved, it executes it directly (e.g. /<path>/node_modules/<expo-path>/bin/cli)
  • This seems to be incorrect when using isolated modules, as this changes the accessible context from "all node_modules which are installed in the project" to "only node_modules of expo"

This method of interacting with the Expo CLI seems not correct, as users would normally use it like:

  • bun expo export ...
  • yarn expo export ...
  • npx expo export ...
  • pnpm expo export ...
image

What platform(s) does this occur on?

Android, iOS, Web

SDK Version

50.0.0

Environment

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 14.1.2
      Shell: 5.9 - /opt/homebrew/bin/zsh
    Binaries:
      Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
      Yarn: 1.22.21 - ~/.nvm/versions/node/v20.10.0/bin/yarn
      npm: 10.2.4 - ~/.nvm/versions/node/v20.10.0/bin/npm
    Managers:
      CocoaPods: 1.13.0 - /Users/cedric/.rvm/gems/ruby-2.7.4/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
      Android SDK:
        API Levels: 31, 33, 33
        Build Tools: 30.0.2, 30.0.3, 31.0.0, 33.0.0, 33.0.1
        System Images: android-30 | Google APIs ARM 64 v8a, android-31 | Google APIs ARM 64 v8a, android-33 | Google APIs ARM 64 v8a
    IDEs:
      Android Studio: 2022.1 AI-221.6008.13.2211.9477386
      Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild
    npmPackages:
      babel-preset-expo: ~10.0.0 => 10.0.0 
      expo: 50.0.0-beta.0 => 50.0.0-beta.0 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.73.0 => 0.73.0 
      react-native-web: ~0.19.6 => 0.19.6 
    npmGlobalPackages:
      eas-cli: 5.9.1
    Expo Workflow: managed

Minimal reproducible example

  • $ git clone [email protected]:byCedric/expo-monorepo-example.git ./issue-2150
  • $ cd ./issue-2150
  • $ git checkout issues/eas/2150
  • $ pnpm install
  • $ cd apps/mobile
  • $ eas update --branch issue-eas-2150 --message "Test issue 2150"

The above command sequence fails with the error listed above.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions