Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

819
Vistas
How to install react navigation?

I'm a beginner in coding which means i follow tutorials from youtube. The project that i'm making uses react-navigation/native, but when i tried to install it, it gives me this error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-native-elements@3.4.2
npm ERR! Found: react-native-safe-area-context@4.2.5
npm ERR! node_modules/react-native-safe-area-context
npm ERR!   react-native-safe-area-context@"^4.2.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-safe-area-context@"^3.1.9" from react-native-elements@3.4.2
npm ERR! node_modules/react-native-elements     
npm ERR!   react-native-elements@"^3.4.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react-native-safe-area-context@3.4.1
npm ERR! node_modules/react-native-safe-area-context
npm ERR!   peer react-native-safe-area-context@"^3.1.9" from react-native-elements@3.4.2        
npm ERR!   node_modules/react-native-elements   
npm ERR!     react-native-elements@"^3.4.2" 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\ps3pl\AppData\Local\npm-cache\eresolve-report.txt for a full r
eport.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ps3pl\AppData\Local\npm-cache\_logs\2022-05-29T06_56_49_981Z-d
ebug-0.log

I am building using EXPO This is my package.json file:

{
  "name": "uber-clone",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@reduxjs/toolkit": "^1.8.2",
    "expo": "~45.0.0",
    "expo-status-bar": "~1.3.0",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-elements": "^3.4.2",
    "react-native-safe-area-context": "^4.2.5",
    "react-native-vector-icons": "^9.1.0",
    "react-native-web": "0.17.7",
    "react-redux": "^8.0.2",
    "tailwind-react-native-classnames": "^1.5.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Try using the flag --legacy-peer-deps.

npm install @react-navigation/native --legacy-peer-deps
about 4 years ago · Juan Pablo Isaza Denunciar

0

your problem is almost similar to How to get npm to install a single package?

read the answer carefully.

solution:

try to resolve the issue with correct package version as the error message suggested.

if you couldn't do it use

npm install @react-navigation/native --legacy-peer-deps

or

npm install @react-navigation/native --force

Be sure you may get conflict issues while developing.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda