-
Notifications
You must be signed in to change notification settings - Fork 53
Getting duplicated class errors, how to avoid it? #64
Comments
Unfortunately no. I think there's a pull request open for controlling but it hasn't been necessary and I'd strongly prefer not to as it hasn't been necessary for a year. The right course of action is to fix the module. The second-most-right course of action is to use https://github.com/ds300/patch-package to fix it in exactly the way I PRd to the linked example |
Ok, thanks for informing. I guess upgrade to react native 61.5 is the only workaround available for us for now, since it will not need jetifier as per NPM description. Without AndroidManifest this module breaks and patch-package didn't worked at all. Thanks for the fast response, anyway. :) |
upgrading will likely get rid of the problem just because most modules are AndroidX now so you won't need to reverse jetify. I am sorry in advance for you as that is a difficult upgrade, but https://react-native-community.github.io/upgrade-helper/ can help, and the end result (if you haven't worked with 0.60+ yet) is very very, nice. Auto-linking is a really big improvement. Fast reload is fantastic, etc. |
Thanks for support. It may help. So we only got this because client was running manually, and in this case it was applying for all node_modules, right? In 61.5 I could see as per NPM Description that is not required to run manually. Closed this ticket. Comment here if it actually works, after upgrading, for reference. Thanks! |
jetifier always runs against all of node_modules if you run it, and for the react-native-cli bundled with react-native it runs automatically by default (against all node_modules). It basically always runs, and if it fails, the module it fails on needs a change - we haven't documented a failure in months and months even against failing modules, and prior to that it was always something the module was doing ... not quite right and they were always willing to patch the module, with patch-package working until then. No idea what module you're having a problem with but you should really pursue it with them That said, upgrading to current stable react-native (0.62.2 now) is generally recommended |
By troubleshooting session of ReadMe, I saw this:
I have one customer project (React Native v0.59.9) that depends on jetify to work but has one node_module that has its own AndroidManifest.xml file. There is any way to run jetify without affect only this module? Any flag / config that may ignore the process to one particular module?
It would be good to have more control of where and how jetify runs in the whole project. Already tried on gradle level (things such as blacklist) and we still getting the same error:
The text was updated successfully, but these errors were encountered: