Skip to content

[Mobile] Lack of support for hoisted monorepositories in Expo config plugin #28672

@artus9033

Description

@artus9033

Describe the issue

The current logic in ORT Expo config plugin hardcodes the path to the pod injected to the app's Podfile during CNG: newSrc: " pod 'onnxruntime-react-native', :path => '../node_modules/onnxruntime-react-native'",. In practice, this does not work in monorepositories with package managers supporting hosting (e.g. pnpm), where the package may be installed elsewhere.

As an example, consider the following monorepository layout:

  • package.json
  • node_modules <- onnxruntime-react-native hoisted install location
  • apps/
    • myapp/
      • package.json <- onnxruntime-react-native dependency
      • ios
        • Podfile <- reference to the onnxruntime-react-native should be: ../../../node_modules/onnxruntime-react-native

To reproduce

  1. Create a monorepository with pnpm
  2. mkdir apps/ && cd apps/
  3. Create an expo app: pnpm create expo-app
  4. pnpm add onnxruntime-react-native
  5. Add the onnxruntime-react-native Expo config plugin to app.json
  6. npx expo prebuild
  7. Observe wrong path in the synthesized ios/Podfile - it will cause an error when installing pods

Urgency

Incompatibility with monorepositories when using Expo

Platform

iOS

OS Version

N/A

ONNX Runtime Installation

Released Package

Compiler Version (if 'Built from Source')

No response

Package Name (if 'Released Package')

None

ONNX Runtime Version or Commit ID

1.24.3

ONNX Runtime API

Objective-C/Swift

Architecture

Other / Unknown

Execution Provider

Other / Unknown

Execution Provider Library Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform:mobileissues related to ONNX Runtime mobile; typically submitted using templateplatform:webissues related to ONNX Runtime web; typically submitted using template

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions