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

Viewed 1423

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

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.

Related