Troubleshooting
Monorepo + pnpm: Android Gradle paths
If your app lives in a monorepo and you install dependencies with pnpm, node_modules is usually at the workspace root. Update the Android Gradle files to point to the workspace root by replacing ../node_modules with {path_to_root}/node_modules in:
android/settings.gradleandroid/app/build.gradle
For example:
android/settings.gradle
android/app/build.gradle
Expo Config Plugins: reapply the patch on every prebuild
If you use @rock-js/plugin-expo-config-plugins, prebuild regenerates the native projects, so you must reapply the Gradle path patch after each prebuild.
- Create a small script to patch both files
- Then run it after every prebuild:
package.json
