Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
byCedric opened this issue Dec 12, 2023 · 0 comments
Open

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

byCedric opened this issue Dec 12, 2023 · 0 comments
Assignees

Comments

@byCedric
Copy link
Member

byCedric commented Dec 12, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant