Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

689
Visualizações
unable to resolve dependency tree when installing @react-navigation/stack@5.14.3

I created a new project react-native init MyProject and after opening it in VSCode the first thing I did was to install the navigation.

npm install @react-navigation/native @react-navigation/stack

It throws the error, then I did it separately meaning first I did npm install @react-navigation/native it gets installed successfully then after this I did npm install @react-navigation/stack then the error came again:

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: MyProject@0.0.1 npm ERR! Found: react@17.0.1 npm ERR! node_modules/react npm ERR!
react@"17.0.1" from the root project npm ERR! peer react@"*" from @react-navigation/stack@5.14.3 npm ERR!
node_modules/@react-navigation/stack npm ERR!
@react-navigation/stack@"^5.14.2" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.0" from @react-native-community/masked-view@0.1.10 npm ERR! node_modules/@react-native-community/masked-view npm ERR!
@react-native-community/masked-view@"^0.1.10" from the root project npm ERR! peer @react-native-community/masked-view@">= 0.1.0" from @react-navigation/stack@5.14.3 npm ERR!
node_modules/@react-navigation/stack npm ERR!
@react-navigation/stack@"^5.14.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 /Users/chaudhrytalha/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR!
/Users/chaudhrytalha/.npm/_logs/2021-03-17T10_09_02_128Z-debug.log

I even tried installing npm install @react-native-community/masked-view but get similar errors.

over 4 years ago · Santiago Trujillo
7 Respostas
Responde à pergunta

0

Try installing navigation in the same directory as your project

over 4 years ago · Santiago Trujillo Relatório

0

Same issue and 2 suggestion Github-9426

1.option is use yarn instead of npm. worked for me.

yarn add @react-native-community/masked-view
yarn add @react-navigation/stack

2.option is react-navigation v6. but not working for me. v6 is not stable yet.

over 4 years ago · Santiago Trujillo Relatório

0

Removing undefined line in the dependencies secton of the package.json file and then reinstalling navigation worked for me

over 4 years ago · Santiago Trujillo Relatório

0

npm install @react-navigation/stack --force

Install it with --force at the end

over 4 years ago · Santiago Trujillo Relatório

0

Using yarn instead of npm is solved my issue.

over 4 years ago · Santiago Trujillo Relatório

0

This will solve the issue

npm install --legecy-peer-deps @react-navigation/stack --force

over 4 years ago · Santiago Trujillo Relatório

0

Use yarn package manager

 npm install --global yarn

use yarn to resolve your package.json deps

yarn install
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda