How to install React Native on Ubuntu?


Share:
Published By: Admin, Published On: Mar 31, 2021, Category: React Native

Hi Guys,

Today, I will learn you how to install React Native on Ubuntu. We will install react native on Ubuntu. I will show step by step ubuntu in install react native.we’ll focus on installing React Native on Ubuntu.

Here, I will give step by step install React Native on Ubuntu as bellow.

Step 1:Install NodeJS and NPM

In this step,I will install NodeJS, which is a popular javascript implementation, you’ll need to take the following. To get this version, you can use the apt package manager. Refresh your local package index by typing:

sudo apt update
Install Node.js from the repositories:
sudo apt install nodejs

If the package in the repositories suits your needs, this is all you need to do to get set up with Node.js. In most cases, you’ll also want to install npm, the Node.js package manager. You can do this by typing:

sudo apt install npm

This will allow you to install modules and packages to use with Node.js.

Because of a conflict with another package, the executable from the Ubuntu repositories is called nodejs instead of node. Keep this in mind as you are running software.

To check which version of Node.js you have installed after these initial steps, type:

nodejs -v
Step 2:Install Expo cli

The next step is to install React Native. It’s important to note that you will need to make use of sudo to install React Native as a root. The reason behind this is that we’re going to install it globally. Here’s the code, which you need to use

sudo npm install expo-cli --global
Step 3:Create project

After the successful installation of Expo CLU, it’s time to use the CLI to create an expo project. Run the following command:

expo init MyWebtutsAwesomeProject

Upon running this command, the CLI will ask you to chose a type of template for your project. Choose blank (minimal dependencies).

Next, the CLI will ask you to set a name for your project:

After this, the required dependencies will be installed and your project will finish building.

Step 4:Run project

In a terminal in your project directory, type the following command to run your project.

cd MyWebtutsAwesomeProject
expo start

If your project runs successfully, a QR code will appear on your terminal as shown.

This will start a development server for you.

I hope it can help you...

Share: