» npm install @react-native-community/cli
Videos
» npm install react-native-cli
» npm install react-native
Hey everyone,
I'm running into a lot of build issues with React Native — first with ^0.77.1, and now even after trying 0.79.1, the problems persist. Some of the main issues:
react-native-svgthrowing C++ build system errorsProblems with
react-native-screensOther native modules behaving inconsistently or not building properly
It’s really frustrating and time-consuming. Even basic tasks like installing a new package can take over 30 minutes to build and start the project again.
I’m not doing a major upgrade — just trying to get a clean project running smoothly, but these issues are killing productivity.
Can anyone suggest a stable and reliable React Native version you're using right now in production or active development, with minimal dependency pain?
Also, if you're facing issues with react-native-svg**, check out this GitHub issue:**
🔗 https://github.com/software-mansion/react-native-svg/issues/2654
Thanks in advance! 🙏
To see what version you have on your Mac(Window also can run that code.), run react-native -v and you should get something like this:
If you want to know what version your project is running, look in /node_modules/react-native/package.json and look for the version key:
The best practice for checking the react native environment information.
react-native info
which will give the information
React Native Environment Info:
System:
OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
Memory: 2.08 GB / 7.67 GB
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 8.10.0 - /usr/bin/node
Yarn: 1.12.3 - /usr/bin/yarn
npm: 3.5.2 - /usr/bin/npm
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native: 0.57.8
The Homebrew way
Remove globally first if needed
npm uninstall -g react-native-cli
or
yarn remove react-native-cli
Install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install it with brew
brew install react-native-cli
Upgrade in future
brew upgrade react-native-cli
Since you are using react-native 0.61.5 you need to install react-native-cli version 3.0.0 or above according to Compatibility of React Native CLI.
If you have already installed a version of react-native CLI, uninstall it using
npm uninstall -g react-native-cli
Then try to install react-native CLI as below,
npm install [email protected]
Hope this will help you.
Note:
This may not work with react-native-cli version 4.0.0 or above.