3
npm install native-base     
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: react@16.13.1
npm ERR! node_modules/react
npm ERR!   peer react@"^16.13.1" from react-dom@16.13.1
npm ERR!   node_modules/react-dom
npm ERR!     peer react-dom@">=16.5.1" from react-native-web@0.13.18
npm ERR!     node_modules/react-native-web
npm ERR!       react-native-web@"~0.13.12" from the root project
npm ERR!     react-dom@"16.13.1" from the root project
npm ERR!   peer react@"16.13.1" from react-native@0.63.2
npm ERR!   node_modules/react-native
npm ERR!     peer react-native@">=0.62.0-rc.0 <0.64.0" from @react-native-community/cli@4.14.0
npm ERR!     node_modules/@react-native-community/cli
npm ERR!       @react-native-community/cli@"^4.14.0" from react-native@0.63.2
npm ERR!     peer react-native@"*" from react-native-safe-area-context@3.2.0
npm ERR!     node_modules/react-native-safe-area-context
npm ERR!       react-native-safe-area-context@"3.2.0" from expo@41.0.1
npm ERR!       node_modules/expo
npm ERR!         expo@"~41.0.1" from the root project
npm ERR!     3 more (the root project, native-base, @codler/react-native-keyboard-aware-scroll-view)
npm ERR!   5 more (react-native-safe-area-context, react-native-web, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.1" from react-native-windows@0.64.4
npm ERR! node_modules/native-base/node_modules/react-native-windows
npm ERR!   peer react-native-windows@">=0.62" from @react-native-community/datetimepicker@3.4.7
npm ERR!   node_modules/native-base/node_modules/@react-native-community/datetimepicker
npm ERR!     @react-native-community/datetimepicker@"^3.0.2" from native-base@2.15.2
npm ERR!     node_modules/native-base
npm ERR!       native-base@"*" 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/idanknafo/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/idanknafo/.npm/_logs/2021-04-26T15_35_25_621Z-debug.log

Hello everyone I am trying to install the native-base directory and I get this error anyone know how to fix this? Thanks in advance! If that helps i am working on macbook pro m1

Phil
  • 435
  • 2
  • 9
  • 28
Idan
  • 31
  • 3

2 Answers2

0

This command may solve your problem:

npm install native-base --force

or

npm install native-base --legacy-peer-deps

0

I faced this problem today, so I used yarn add native-base instead of npm.

Timmy
  • 4,098
  • 2
  • 14
  • 34