Unable to update cleanly to Expo 44
See original GitHub issueDescribe the bug
npm i --save-dev @testing-library/react-native@latest react-test-renderer@latest
Should update the dependencies to the current version using npm
which has stricter peer version resolution than yarn
, but it is failing.
❯ npm i --save-dev @testing-library/react-native@latest react-test-renderer@latest
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @devhaus/dh-chat@1.2.8
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! dev react@"17.0.1" from the root project
npm ERR! peer react@">=16.0.0" from @testing-library/react-native@9.0.0
npm ERR! node_modules/@testing-library/react-native
npm ERR! dev @testing-library/react-native@"9.0.0" from the root project
npm ERR! 1 more (react-native)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.2" from react-test-renderer@17.0.2
npm ERR! node_modules/react-test-renderer
npm ERR! dev react-test-renderer@"17.0.2" from the root project
npm ERR! peer react-test-renderer@">=16.0.0" from @testing-library/react-native@9.0.0
npm ERR! node_modules/@testing-library/react-native
npm ERR! dev @testing-library/react-native@"9.0.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.
npm ERR!
npm ERR! See C:\Users\trajano\AppData\Local\npm-cache\eresolve-report.txt for a full report.
Expected behavior
Should work, but didn’t I had to do
npm i --save-dev --legacy-peer-deps @testing-library/react-native@latest react-test-renderer@latest
Steps to Reproduce
From an Expo 44 project
npm i --save-dev @testing-library/react-native@latest react-test-renderer@latest
Screenshots
Versions
This is after I ran the --legacy-peer-deps
❯ npx envinfo --npmPackages react,react-native,react-test-renderer,@testing-library/react-native
npmPackages:
@testing-library/react-native: ^9.0.0 => 9.0.0
react: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-test-renderer: ^17.0.2 => 17.0.2
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top Results From Across the Web
react native - Expo SDK upgrade from 44 to 46 is causing issues
as a workaround u can keep Expo version 44. just upgrade targetSdkVersion and compileSdkVersion inside android/build.gradle to 31 upload a ...
Read more >"React Native version mismatch" errors - Expo Documentation
Run expo-cli doctor will show a warning where the react-native version you should install. If you did upgrade to newer SDK, make sure...
Read more >expo-updates/README.md - UNPKG
If your `AppDelegate` has been customized and the diff doesn't apply cleanly, the important part is calling `[[EXUpdatesAppController sharedInstance] ...
Read more >Expo SDK update from 42 to 46 - a lot work? : r/reactnative
Make sure everything is installed $ expo install # Upgrade your project to Expo SDK 44 (or any other version :)) $ expo...
Read more >expo-cli | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@trajano the error seems to be the same, it tries to resolve the react 17.0.2 peer dependency from react-test-renderer 17.0.2, I think it is because you’re installing react-test-renderer@“^17.0.1”, which resolves to the version 17.0.2, maybe you can try installing react-test-renderer@17.0.1 instead
@trajano this doesn’t work because react 17.0.2 is a peer dep of react-test-renderer 17.0.2. You can either use version 17.0.1 of react-test-renderer or bump your react version to 17.0.1