@@ -208,4 +208,44 @@ This will give you information about what react native needs in order to run,
208208and whether it is accessible to the app.
209209
210210Take a look at the OS you are trying to run. Make sure that everything has been
211- installed and that the necessary items have been added to your ` PATH ` .
211+ installed and that the necessary items have been added to your ` PATH ` . Below
212+ are example items that are commonly added to the * .zshrc* or * .bashrc* :
213+
214+ ``` zsh
215+ # Load rbenv if using (suggested)
216+ if which rbenv > /dev/null; then eval " $( rbenv init -) " ; fi
217+
218+ # Load nvm if using (suggested)
219+ export NVM_DIR=" $HOME /.nvm"
220+ [ -s " $NVM_DIR /nvm.sh" ] && \. " $NVM_DIR /nvm.sh" # This loads nvm
221+ [ -s " $NVM_DIR /bash_completion" ] && \. " $NVM_DIR /bash_completion" # This loads nvm bash_completion
222+
223+ # General paths
224+ export PATH=$HOME /bin:/usr/local/bin:$PATH
225+ export PATH=$PATH :$( pwd) /bin
226+
227+ # Homebrew setup
228+ if [ -d " /opt/homebrew/bin" ]; then
229+ export PATH=" /opt/homebrew/bin:$PATH "
230+ fi
231+
232+ # Android paths and variables
233+ export ANDROID_HOME=$HOME /Library/Android/sdk
234+ export ANDROID_SDK_ROOT=$ANDROID_HOME
235+ export PATH=$PATH :$ANDROID_HOME
236+ export PATH=$PATH :$ANDROID_HOME /emulator
237+ export PATH=$PATH :$ANDROID_HOME /platform-tools
238+ export PATH=$PATH :/opt/homebrew/bin/gradle
239+ export PATH=$PATH :$ANDROID_HOME /cmdline-tools/latest/bin
240+
241+ # Java variables
242+ export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
243+
244+ # Node variables and settings
245+ export NODE_BINARY=node
246+ export NODE_OPTIONS=--openssl-legacy-provider
247+ ```
248+
249+ You should also look through the [ React Native environment setup
250+ docs] ( https://reactnative.dev/docs/set-up-your-environment ) and make sure that
251+ you did not miss anything.
0 commit comments