Skip to content

Repack with RN 0.84 throwing Panic occurred at runtime when running yarn start #1354

@flixyudh

Description

@flixyudh

Describe the bug

I want to try repack with latest RN (0.84.0), I follow https://re-pack.dev/docs/getting-started/quick-start but got this error

❯ yarn dlx @callstack/repack-init
➤ YN0000: · Yarn 4.9.2
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @callstack/repack-init@npm:5.2.4, @xmldom/xmldom@npm:0.8.11, argparse@npm:1.0.10, base64-js@npm:1.5.1, big-integer@npm:1.6.52, bplist-creator@npm:0.1.1, bplist-parser@npm:0.3.2, braces@npm:3.0.3, and 29 more.
➤ YN0000: └ Completed in 0s 459ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 37 packages were added to the project (+ 3.33 MiB).
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: · Done with warnings in 0s 525ms

│
│  ▄▀▀▀ ▀▀▀▀   █▀▀█ █▀▀█ ▄▀▀▀ █  █
│  █    ▀▀▀▀   █▀▀▀ █▀▀█ █    █▀▀▄
│  ▀    ▀▀▀▀ ▀ ▀    ▀  ▀  ▀▀▀ ▀  ▀
│
◇  How would you like to name the app?
│  RepackApp
│
◇  Which bundler would you like to use?
│  Rspack
│
◓  Creating new project from the React Native Community Template.│
■  Re.Pack setup failed
│  
│  What went wrong:
└  Failed to create a new project using '@react-native-community/cli'

◇  Canceled

so I'm tried to integrate repack with react native init using https://re-pack.dev/docs/migration-guides/metro, but I'm not following the step 4. Configure XCode because when I check the super-app example, the project.pbxproj using default RN script https://github.com/callstack/super-app-showcase/blob/main/packages/host/ios/host.xcodeproj/project.pbxproj#L198

when I tried to run yarn start i got this error:

▄▀▀▀ ▀▀▀▀   █▀▀█ █▀▀█ ▄▀▀▀ █  █
█    ▀▀▀▀   █▀▀▀ █▀▀█ █    █▀▀▄
▀    ▀▀▀▀ ▀ ▀    ▀  ▀  ▀▀▀ ▀  ▀
5.2.4, powered by Rspack

 r: Reload app
 d: Open developer menu
 j: Open debugger
 a: Run adb reverse

Press Ctrl+c or Ctrl+z to quit the dev server

(node:87444) [DEP0155] DeprecationWarning: Use of deprecated trailing slash pattern mapping "./" in the "exports" field module resolution of the package at /MyPath/Flix/apps/Playground/node_modules/react-native/package.json. Mapping specifiers ending in "/" is no longer supported.
(Use `node --trace-deprecation ...` to show where the warning was created)
ℹ [02:05:40.535Z][DevServer] Server listening at http://[::1]:8081 
ℹ [02:05:40.536Z][DevServer] Server listening at http://127.0.0.1:8081 
⠋ [02:05:40.982Z][DevServer] [===-------------] 16% ios     
⠙ [02:05:40.982Z][DevServer] [===-------------] 16% android 
Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues: panicked at index.crates.io-1949cf8c6b5b557f/swc_ecma_compat_es2015-40.0.0/src/destructuring.rs:422:52:
internal error: entered unreachable code: Object rest pattern should be removed by es2018::object_rest_spread pass
❯ node -v
v22.22.0

Re.Pack Version

5.2.4

Reproduction

https://github.com/flixyudh/RepackPlayground

Steps to reproduce

  1. yarn
  2. yarn workspace Playground dlx pod-install
  3. yarn workspace Playground ios
  4. yarn workspace Playground start

Metadata

Metadata

Assignees

No one assigned

    Labels

    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