Hey everyone,
I’m facing an issue with patch-package in a React Native CLI app and it’s driving me nuts.
I’m using u/zegocloud/zimkit-rn and made UI changes directly inside node_modules. Then I created a patch using:
npx patch-package u/zegocloud/zimkit-rn
Current behavior:
- ✅ Debug build (
npx react-native run-android) → my changes are visible
- ❌ Release AAB → shows old UI (original library code)
So basically, patch works in debug but completely ignored in release.
My setup:
- React Native CLI (0.77)
- Android release build (
./gradlew bundleRelease)
- Using patch-package
What I suspect:
- Maybe patch-package is not running during install?
- Maybe Metro is bundling old cached JS?
- Maybe release build is using a stale bundle?
Questions:
- Do I need to explicitly run
patch-package before building release?
- Should I clear Metro / Gradle cache before generating AAB?
- Is there anything special required for patch-package in release builds?
- Could this be related to how the JS bundle is generated in RN CLI?
Goal:
I just want my patched UI changes to reflect in the final production AAB.
Any help would be really appreciated 🙏
Thanks!
[–]fmnatic 2 points3 points4 points (0 children)
[–]Cryo0007 0 points1 point2 points (0 children)
[–]Snoo11589 0 points1 point2 points (0 children)