Skip to content

npm install fails with react 17.0.1 and react-native 0.64.0 #2603

Description

@aboodtech

Current behaviour

npm install react-native-paper fails with latest react-native release 0.64.0

Error is displayed when trying to install react-native-paper using npm

Expected behaviour

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! peer react@"17.0.1" from react-native@0.64.0
npm ERR! node_modules/react-native
npm ERR! peer react-native@">=0.64.0-rc.0 || 0.0.0-" from @react-native-community/cli@5.0.1-alpha.1
npm ERR! node_modules/@react-native-community/cli
npm ERR! @react-native-community/cli@"^5.0.1-alpha.0" from react-native@0.64.0
npm ERR! react-native@"0.64.0" from the root project
npm ERR! 1 more (react-native-paper)
npm ERR! peer react@"^16.0.0 || ^17.0.0" from react-shallow-renderer@16.14.1
npm ERR! node_modules/react-shallow-renderer
npm ERR! react-shallow-renderer@"^16.13.1" from react-test-renderer@17.0.1
npm ERR! node_modules/react-test-renderer
npm ERR! dev react-test-renderer@"17.0.1" from the root project
npm ERR! 4 more (react-test-renderer, use-subscription, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.3.0" from @callstack/react-theme-provider@3.0.5
npm ERR! node_modules/react-native-paper/node_modules/@callstack/react-theme-provider
npm ERR! @callstack/react-theme-provider@"^3.0.5" from react-native-paper@4.7.2
npm ERR! node_modules/react-native-paper
npm ERR! react-native-paper@"
" 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 /Users/xx/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xx/.npm/_logs/2021-03-15T10_46_15_026Z-debug.log

Code sample

npx react-native init MyTestApp
cd MyTestApp && npm install react-native-paper

Screenshots (if applicable)

What have you tried

yarn seems to work fine.

Your Environment

software version
ios or android both
react-native 0.64.0
react-native-paper 4.7.2
node v14.15.1
npm or yarn npm: 7.6.3
expo sdk

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