Hello, friends. Ubuntu 20.04 is a good system to start developing applications and this is well known by most veteran developers. So, today I will show you how to install ReactJS on Ubuntu 20.04 as a first step so you can start using this tool for your web applications.
So, first, let’s talk about what is ReactJS
For these and other reasons, many developers use it in their front-end projects.
So, let’s install it.
React, as we’ll call it, depends on NodeJS so the first step is to install it on the system.
So, open a terminal and update the distro completely.
sudo apt update sudo apt upgrade
After that, add the NodeJS 14.x repository which is the version we will be working with.
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
When the process is finished, we can start the NodeJS installation by running the following command
sudo apt install nodejs
When finished, you will be able to check the version of NodeJS installed on the system.
node -v v14.18.0
Now it is necessary to install a recent version of NPM to do so run
sudo npm install npm@latest -g
/usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js /usr/bin/npx -> /usr/lib/node_modules/npm/bin/npx-cli.js + [email protected] added 70 packages from 27 contributors, removed 250 packages and updated 187 packages in 6.975s
To install ReactJS then, run the following command
sudo npm install -g create-react-app
Query the installed version to check that the installation was successful.
create-react-app --version 4.0.3
With this, we can start creating our projects without problems
To create a new project with ReactJS just run the following command
You have to replace
example with the name of your project. This will start the whole process of downloading and configuring the new project.
When the process is finished, you will see the following output on the screen
As you can see, you have some commands that you should use when needed. To check that everything went well, run
Now open a web browser and go to
http://localhost:3000 and you’ll see a screen like this
So, ReactJS is ready and you can now create great creations with it. Enjoy it!
ReactJS is a great tool on the Front-end side itself gives us answers to many problems arising from the use of JQuery. So, in this post, you learn how to install it on Ubuntu 20.04