Skip to content

Errors when using babel-loader during compilation #1153

Closed

Description

@zirgulis

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

Activity

  1. changed the title [-]Errors when using babel-loader[/-] [+]Errors when using babel-loader during compilation[/+] on May 14, 2025
  2. github-actions commented on Jun 14, 2025

    @github-actions
    Contributor

    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.

  3. self-assigned this
    on Jun 16, 2025
  4. added
    pinnedKeeps this issue or PR active and prevents it from going stale.
    and removed
    status:staleMissing feedback or response for prolonged period of time.
    on Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pinnedKeeps this issue or PR active and prevents it from going stale.status:newNew issue, not reviewed by the team yet.type:bugA bug report.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions