When using rnuc for a project which is a part of monorepo the following things can some handy:
-
Specifying path to react-native
build.gradle
will try to find path to a folder withreact-native
which maybe quite problematic with monorepo. If this is true you need to specify path to react-native yourself using this snipped in your rootbuild.gradle
:buildscript { ext { REACT_NATIVE_NODE_MODULES_DIR = "<prefix>/../node_modules/react-native" } }
where
<prefix>
are several../
depending on how your repo is structured. Normally this should be only two../../
if you have the following layout of packages:|-- package.json |-- node_modules |-- react-native-ultimate-config |-- packages |-- my_app |-- package1 |-- package2 |-- packageN