Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: repack react native module was not found. Did you forget to update native dependencies? #598

Closed
DivyatejaChe opened this issue May 6, 2024 · 7 comments
Labels

Comments

@DivyatejaChe
Copy link

Ask your Question

Screenshot 2024-05-07 at 04 46 16
  • Error observed when setting up Re.Pack in an existing monorepo created using YARN workspaces
  • Reproducible repo: repack branch in this repo
  • Issue reproducible on both Android and iOS
  • Performed pod install too
  • Please note that I have hoisted all the dependencies at the root level of the monorepo only
  • Path for Bundle React Native code and images set as follows
set -e

WITH_ENVIRONMENT="../../../node_modules/react-native/scripts/xcode/with-environment.sh"
export BUNDLE_COMMAND=webpack-bundle
REACT_NATIVE_XCODE="../../../node_modules/react-native/scripts/react-native-xcode.sh"

/bin/sh -c "$WITH_ENVIRONMENT $REACT_NATIVE_XCODE"
@DivyatejaChe
Copy link
Author

DivyatejaChe commented May 7, 2024

hello @jbroma , can you help take a look into this, please if you have a few mins? I see that its an error thrown by Re.Pack in ScriptManager.js. Would you know in what scenarios it could not find the native module?

@jbroma
Copy link
Member

jbroma commented May 7, 2024

@DivyatejaChe

The reproduction repository you've provided is not public, therefore I won't be able to assist you directly. You can contact jakub.stadniczuk@callstack.com if you want us to take a closer look at that.

Have you tried using the latest RC release 4.0.0-rc.2? Perhaps the issue will resolve itself when you use it, we fixed a ton of things since 3.7.0.

@DivyatejaChe
Copy link
Author

DivyatejaChe commented May 7, 2024

hey @jbroma , I just made the repo public. Can you please take a look? Please make sure to check the repack branch, not the 'main'

@DivyatejaChe
Copy link
Author

DivyatejaChe commented May 7, 2024

As for the latest RC release, is there any breaking changes from 3.x.x or is the migration smooth? @jbroma

@jbroma
Copy link
Member

jbroma commented May 7, 2024

@DivyatejaChe thanks, I'll take a look tomorrow. As for the migration process, it should be relatively smooth, you can check last few release notes, should be all listed there. Migration guide is in the works.

@jbroma
Copy link
Member

jbroma commented May 8, 2024

@DivyatejaChe after taking a quick look - please don't add @callstack/repack in the root of your repo, instead add it as a devDependency of each app where you use it. That's probably why autolinking was failing and your module was not found. Please see if that helps.

@DivyatejaChe
Copy link
Author

@DivyatejaChe after taking a quick look - please don't add @callstack/repack in the root of your repo, instead add it as a devDependency of each app where you use it. That's probably why autolinking was failing and your module was not found. Please see if that helps.

hey @jbroma, thanks for the help! I upgraded to 4.0.0 and was able to run. Congrats on the new release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants