React Native Dependencies in pluggable widget- Newer version of react-native-reanimated
Hi Mendix community! I am developing a pluggable react native widget. I am trying to use a third party react native package but have been running into some dependency issues related to the react-native-reanimated package. The package I am trying to use has react-native-reanimated as a dependency however react-native-reanimated is also one of the default packages that Mendix supports (as specified here). The version that mendix supports(1.13.1) is relatively old at this point and the third party package I am using requires a higher version. Is it possible to use a newer version of react-native-reanimated in my pluggable widget? Whenever I build locally, the dependency is always listed in the package.json of the Native Mobile Template as the earlier version(1.13.1) that comes default with Mendix even though I have explicitly included the newer version as a nativeDependency in my custom widget directory. I see that there is a patch file for the react-native-reanimated package in the native mobile template. As I understand the patch file should enable different versions of the package to not break the default Mendix widgets that use the older version. But maybe this is incorrect. Any insight is appreciated!
I had the same problem. I mentioned it on the Mendix slack community. Mendix responded that in Mendix 10.6 there will be some dependency updates. https://mendixcommunity.slack.com/archives/CMVNKFMC0/p1695125805643379
For now I ended up removing the dependency and workaround the broken parts.
But maybe using NPM package aliases is a valid option? https://medium.com/weekly-webtips/how-to-install-multiple-versions-of-the-same-package-in-npm-71c29b12e253