Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

278
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!