Building applications with React Native on Linux or macOS usually need some extra configuration like setting environment variables that sometimes is not clear about where or how to put them.
I am using Arch Linux in my second computer, so I decided to configure it to develop a React Native application. I installed everything and by the time I run the app with:
I got some errors regarding the version of Java, the environment variable and some others, so in order to run your app correctly you must follow these steps:
jdk8-openjdkbecause with Java 10 I couldn’t run the app.
sudo pacman -S jdk8-openjdk
- Add JAVA_HOME to your .bash_profile file
- List your Java environments with
- Set a default Java environment
archlinux-java set [java-8-openjdk]
With those simple steps you will be able to run your react-native application on Arch Linux!