repack icon indicating copy to clipboard operation
repack copied to clipboard

Errors when using babel-loader during compilation

Open zirgulis opened this issue 11 months ago • 1 comments

Describe the bug

When trying to use babel compiler via babel-loader we are getting errors with a message 'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands. This results into JS not being built properly and the app not working.

Image Image

System Info

System:
  OS: macOS 14.6.1
  CPU: (12) arm64 Apple M3 Pro
  Memory: 1.84 GB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.18.1
    path: ~/.nvm/versions/node/v20.18.1/bin/node
  Yarn: Not Found
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v20.18.1/bin/npm
  Watchman:
    version: 2024.08.12.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/povilas.zirgulis/.gem/ruby/3.3.4/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK:
    API Levels:
      - "31"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 30.0.2
      - 30.0.3
      - 34.0.0
      - 35.0.0
      - 35.0.0
    System Images:
      - android-34 | Android TV ARM 64 v8a
      - android-34 | Google TV ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12700392
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /Users/povilas.zirgulis/.sdkman/candidates/java/current/bin/javac
  Ruby:
    version: 3.3.4
    path: /Users/povilas.zirgulis/.rubies/ruby-3.3.4/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.77.1
    wanted: 0.77.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true

Re.Pack Version

5.0.6

Reproduction

https://github.com/callstack-internal/Expensify-App/tree/ft/repack

Steps to reproduce

  1. Checkout into this branch
  2. npm install
  3. npm run start

zirgulis avatar May 14 '25 13:05 zirgulis

This issue has been marked as stale because it has been inactive for 30 days. Please update this issue or it will be automatically closed in 14 days.

github-actions[bot] avatar Jun 14 '25 00:06 github-actions[bot]