Hi all 🙂, this post is for those who need help in setting up React Native CLI in Linux or macOS. Basically just to ensure you are following the steps in Setting up the development environment but do take EXTRA NOTE ⚠️ on the 👉 Important 👈 mentioned below.
Sorry for those who using Windows 🙇, you may still need refer to the Setting up the development environment and let the Chocolatey to settle for you.
I use Windows entertainment purpose only. 🎉
Side Note:
Linux or Windows only support Android since you can only install Android Studio.
If you want to experience the cross-platform nature provided by react-native, please get a macOS since you can install both Android Studio and Xcode.
Important: ⁉️
- For node, I recommend to use nvm to install instead of using Homebrew for macOS.
- Same for ruby, you may use rbenv to install.
- For Cocoapods, if you are using Mac M1, you might need to use
arch -x86_64 pod install
- But I recommend to use brew to install Cocoapods, because now you can use
pod install
as per mentioned in Stack Overflow. - Do take note that you need to reinstall yarn if you CHANGE the node version via nvm.
Dependencies:
- node - recommend to install via nvm 👇
- nvm ☝️☝️
- npm - packages manager
- yarn - packages manager (optional)
- Homebrew (for macOS only)
- ruby (for macOS only) - recommend to install via rbenv 👇
- rbenv (for macOS only) ☝️☝️
IDE:
- Visual Studio Code (because it is free)
- Android Studio
- Xcode (for macOS only)
- WebStorm by JetBrains (Optional)
Steps:
- Install node via nvm.
- Refer the steps in Setting up the development environment
- Install watchman via brew. (macOS only)
Android:
- Install JDK.
- Install Android Studio.
- Install Android SDK.
iOS:
- Install ruby via rbenv. (optional because macOS should have ruby installed.)
- Install Cocoapods via brew.
- Install Xcode & Xcode Command Line Tool.
References:
- Setting up the development environment
- Cocoapods
- Stack Overflow: How to run CocoaPods on Apple Silicon (M1)
This is just my experience on settings up React Native CLI, and I am welcome and open to any feedback. Thank you. 🙇
Good luck and Happy coding! 🎉🎊🎇
Top comments (0)