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

283
Visualizações
Error when starting new React Native Project

I'm following the setup instructions from the React Native Documentation page, on my M1 Macbook Pro. I have previously worked on React projects and was able to create and run React Native Expo projects previously on the same machine.

I followed the instructions to the letter, but when I arrived at the 'Create A New Application" section, using the npx react-native init AwesomeProject command, the new project creation failed. Here are the error message outputted on the Terminal:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: undefined@undefined
npm ERR! Found: react-native@0.66.4
npm ERR! node_modules/react-native
npm ERR!   peer react-native@"*" from @react-native-community/cli@6.3.1
npm ERR!   node_modules/@react-native-community/cli
npm ERR!     @react-native-community/cli@"^6.0.0" from react-native@0.66.4
npm ERR!   react-native@"0.69.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! react-native@"0.69.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@18.0.0
npm ERR! node_modules/react
npm ERR!   peer react@"18.0.0" from react-native@0.69.2
npm ERR!   node_modules/react-native
npm ERR!     react-native@"0.69.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.

I tried to uninstall react-native and install it back but couldn't find a proper instruction on the net to do that. How can I just scrape the previously installed react-native (judging from the error message, i got RN@0.66.4, when I want to use the latest RN) and install a fresh, latest react native?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

if you are on Mac and your node version is 18.. which Is latest but not greatest.. you need to download 16.. the stable one.

Step-1

brew uninstall node; 
# or `brew uninstall --force node` which removes all versions
brew cleanup;
rm -f /usr/local/bin/npm /usr/local/lib/dtrace/node.d;
rm -rf ~/.npm;

Step 2 - and install it from node site by downloading the binary

Step 3 - just check the node version again if you have 16.. then you can try creating the react native project once again. Please let us know if it worked for you. Wish you luck!!

about 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