dd-sdk-reactnative
dd-sdk-reactnative copied to clipboard
Update react-native-navigation peer dependency to v8
When I attempt to upgrade react-native-navigation from v7 to v8, I'm getting the following on npm install
"@datadog/mobile-react-native": "2.13.0", "@datadog/mobile-react-native-navigation": "2.13.0", "react-native": "0.73.11"
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native-navigation
npm ERR! react-native-navigation@"8.4.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-navigation@"^7.5.0" from @datadog/[email protected]
npm ERR! node_modules/@datadog/mobile-react-native-navigation
npm ERR! @datadog/mobile-react-native-navigation@"2.13.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
I have not tested by updating peer dependency directly in this package to v8 but I was wondering if you guys have tested against react-native-navigation v8 and have plans to support that?
Hey @shercoder, thanks for reaching out, we're looking into this and will get back to you as soon as possible.
@cdn34dd Checking if there was any internal discussion about this and/or ETA on a possible solution?
Hi @shercoder, yes, we had a discussion about this and as a result have added a task to our roadmap to add compatibility with v8 as soon as possible. We are currently working on releasing v3, but will try to get this in if possible too.
Hey @shercoder, I'm unable to reproduce the issue you're facing. I created a new app and integrated our SDKs into it and the app works correctly. I see that you are using version 0.73.11 of react-native which seems to not be supported on version 8 of the react-native-navigation library as you can see here:
https://github.com/wix/react-native-navigation/releases/tag/8.1.0
The only RN version supported officially by this release is 0.77.x with new-architecture fully enabled. Support for any older versions / old-architecture has been completely removed, and it won't be available in any future RNNav 8 version (RNNav v7 is available for that, instead).
So I'd advise you to first upgrade your app to a compatible version and then try again. For reference I tried it with these versions and it worked correctly:
"dependencies": {
"@datadog/mobile-react-native": "^2.13.2",
"@datadog/mobile-react-native-navigation": "^2.13.2",
"react": "18.3.1",
"react-native": "0.77.3",
"react-native-navigation": "^8.4.3",
},
I'll close this issue for now, but once you upgrade your app, If things still don't work for you, feel free to open a new issue so we can look further into it, and if possible provide a sample app to speed things up.