repack
                                
                                
                                
                                    repack copied to clipboard
                            
                            
                            
                        Error : [runtime not ready]: ReferenceError: Property '__webpack_require__' doesn't exist, js engine: hermes
Describe the bug
I’m trying to build the release version using Repack. The build completes successfully, but when I try to run the app, I get an error like the one shown in the screenshot.
I’m using Rspack for the build process, and the app crashes on both Android and iOS.
If I don’t modify the command for bundling React Native code and images, the Metro bundler starts up and causes an error.
To fix this, I updated the CLI_PATH, and now Repack’s bundling runs properly (see the screenshot below for reference).
In the case of Android, when I set hermesEnabled=true and try to build, I get an error saying the file is not in UTF-8 format (see the screenshot below for reference).
When I forcibly set hermesEnabled=false and run the build, the Android app crashes. However, I’m not sure if this issue is actually caused by Repack (see the screenshot below for reference).
In Debug mode, the app launches properly, and everything works as expected — including chunk creation and loading (both local and remote) due to code-splitting.
The issue only occurs in Release mode, where things don’t function correctly.
Has anyone experienced a similar issue or found a solution for this?
System Info
System:
  OS: macOS 15.5
  CPU: (12) arm64 Apple M2 Pro
  Memory: 299.80 MB / 32.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:
    version: 4.9.1-git.20250518.hash-8661aac
    path: ~/.yarn/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v20.18.1/bin/npm
  Watchman:
    version: 2025.03.03.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/ably/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23726.103.2422.12816248
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /usr/bin/javac
  Ruby:
    version: 3.4.4
    path: /Users/ably/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true
react : 19.0.0
react-native : 0.79.1
@callstack/repack : 5.1.2
@callstack/repack-plugin-reanimated : 5.1.2
Re.Pack Version
5.1.2
Reproduction
unavailable
Steps to reproduce
warn Package rn-fetch-blob contains invalid configuration: "dependency.hooks" is not allowed. Please verify it's properly linked using "npx react-native config" command and contact the package maintainers about this. mode development ℹ [11:02:04.845Z][LoggerPlugin] Bundle built with warnings { time: 3680 } ⚠ [11:02:04.845Z][LoggerPlugin] Warning in "../../node_modules/@react-navigation/elements/lib/module/MaskedViewNative.js": ⚠ Module not found: Can't resolve '@react-native-masked-view/masked-view' in '/Users/ably/workspace/wholesale-react-native/node_modules/@react-navigation/elements/lib/module' ╭─[22:20] 20 │ // Add try/catch to support usage even if it's not installed, since it's optional. 21 │ // Newer versions of Metro will handle it properly. 22 │ RNCMaskedView = require('@react-native-masked-view/masked-view').default; · ──────────────────────────────────────────────────────── 23 │ } catch (e) { 24 │ // Ignore ╰────