» 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
React Native is distributed as two npm packages, react-native-cli and react-native.
The first one is a lightweight package that should be installed globally (npm install -g react-native-cli), while the second one contains the actual React Native framework code and is installed locally into your project when you run react-native init.
Because react-native init calls npm install react-native, simply linking your local GitHub clone into npm is not enough to test local changes.
npm install –g react-native-cli
· This line installs the npm package react-native-cli along with its dependencies(from the npm repository host) inside the globally shared node_modules folder.
· Global install (with -g): puts stuff in /usr/local or wherever node is installed. This will also allow you to access the module from the command-line, as the bin is symlinked into a PATH folder (usually usr/local/bin).
Refer below link https://rlogicaltech.medium.com/how-to-install-react-native-on-mac-step-by-step-guide-1ac822aedd4f
You can run the command anywhere in the terminal. It will install the react-native-cli globally as we are specifying the "-g" option in the command.