Skip to content

Unable to update cleanly to Expo 44 #938

Closed
@trajano

Description

@trajano

Describe 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/[email protected]
npm ERR! Found: [email protected]
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/[email protected]
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 [email protected]
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/[email protected]
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions