Skip to content

Instantly share code, notes, and snippets.

@agrcrobles
Last active March 30, 2023 05:03
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agrcrobles/3d945b165871c355b6f169c317958e3e to your computer and use it in GitHub Desktop.
Save agrcrobles/3d945b165871c355b6f169c317958e3e to your computer and use it in GitHub Desktop.
Setup my mac for react native on android

Open iTerm2

Install zshrc

brew install zsh
Running `brew update --preinstall`...

ohmyzsh: https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH

Install git

Following atlassian´s suggestion

Double-click the package in this disk image to install. This installs git to /usr/local/git, and places symlinks into /usr/local/bin and /usr/share/man/.

Install homebrew

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

https://brew.sh/

Xcode Command Line Tools package is installed ( try xcode-select --install will prompt up a dialog)

Make sure the doctor is happy (or do what it tells you):

brew doctor

https://github.com/Homebrew/homebrew-cask/blob/master/USAGE.md

Install Python 3 with brew if needed:

brew install python3

macbookpro@Macbooks-MacBook-Pro ~ % brew install python3

Error: The following directories are not writable by your user: /usr/local/share/man/man5 /usr/local/share/man/man7

You should change the ownership of these directories to your user. sudo chown -R $(whoami) /usr/local/share/man/man5 /usr/local/share/man/man7

And make sure that your user has write permission. chmod u+w /usr/local/share/man/man5 /usr/local/share/man/man7

Install Node

To get these on macOS, you can follow these steps:

Open your terminal of choice Run xcode-select --install as a command A popup will appear Select Install

https://nodesource.com/blog/installing-node-js-tutorial-using-nvm-on-mac-os-x-and-ubuntu/

# curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
nvm install --lts

Installing latest LTS version. Downloading and installing node v16.15.0... Downloading https://nodejs.org/dist/v16.15.0/node-v16.15.0-darwin-x64.tar.gz... ######################################################################### 100.0% Computing checksum with shasum -a 256 Checksums matched! Now using node v16.15.0 (npm v8.5.5) nvm_ensure_default_set: a version is required

Then cat .zshrc outputs

export NVM_DIR="/Users/macbookpro/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

VS Code

Install VS Code ( plugins maybe? )

brew install --cask visual-studio-code

https://formulae.brew.sh/cask/visual-studio-code

Android SDK instructions

https://gist.github.com/agrcrobles/165ac477a9ee51198f4a870c723cd441

React Native additional instructions

https://reactnative.dev/docs/environment-setup

brew install watchman
npm i -g yarn
npx react-native init AwesomeProject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment