Skip to content

Expo example yields "Unable to resolve module ./.expo/.virtual-metro-entry" #722

Closed as not planned
@kraenhansen

Description

@kraenhansen

Description

Instantiating a library with an expo example leads to the following error when starting app and loading the bundle via the Metro dev-server:

Unable to resolve module ./.expo/.virtual-metro-entry from (...)
Image

Searching ☝ lead me to react-native-community/upgrade-support#248 (comment)

I believe the root cause is this file templates/example-common/example/metro.config.js overrides this file templates/expo-library/example/metro.config.js.

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

I ran

npx create-react-native-library@latest react-native-automerge --type turbo-module --example expo --languages cpp

Link to repro

N/A

Environment

System:
  OS: macOS 14.7.1
  CPU: (14) arm64 Apple M3 Max
  Memory: 485.92 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.11.0
    path: ~/.local/state/fnm_multishells/57541_1733576637502/bin/node
  Yarn: Not Found
  npm:
    version: 10.9.0
    path: ~/.local/state/fnm_multishells/57541_1733576637502/bin/npm
  Watchman:
    version: 2024.11.11.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10300.40.2321.11567975
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 16.0.0
    wanted: ^16.0.0
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.3
    wanted: 0.76.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions