Error: repack react native module was not found. Did you forget to update native dependencies?
Ask your Question
- Error observed when setting up Re.Pack in an existing monorepo created using YARN workspaces
- Reproducible repo:
repackbranch in this repo - Issue reproducible on both Android and iOS
- Performed
pod installtoo - 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"
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?
@DivyatejaChe
The reproduction repository you've provided is not public, therefore I won't be able to assist you directly. You can contact [email protected] 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.
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'
As for the latest RC release, is there any breaking changes from 3.x.x or is the migration smooth? @jbroma
@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.
@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 after taking a quick look - please don't add
@callstack/repackin the root of your repo, instead add it as adevDependencyof 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!