Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Command failed: yarn add react-native@latest - React Native

I've been trying to start a new React Native project but have been facing this issue for a few days, tried searching for it on a lot of forums but couldn't find any solution that works for me.

The commands I've tried:

npx react-native init MyApp

npx react-native init MyApp --template react-native-template-typescript

npx --ignore-existing react-native init MyApp --template react-native-template-typescript

Someone mentioned removing react-native-CLI using:

npm uninstall -g react-native-cli and yarn global remove react-native-cli

Still, no luck. Would be great if anyone could help out.

BTW, I've Node version 14.1.0

Here is the error from terminal

like image 861
Amin Avatar asked Feb 03 '26 22:02

Amin


1 Answers

Your version of node (14.1.0) doesn't meet the requirements of the template project.

If you want to stick to node 14, use ^14.15.0, otherwise switch to node 16 (LTS), and re-run the command.

like image 198
Ivanka Todorova Avatar answered Feb 06 '26 11:02

Ivanka Todorova