<\/span><\/h2>\n\n\n\nFirst, you need to install NodeJS since a ReactJS application can only run if NodeJS is installed on your server. Node.js is an open-source and cross-platform JavaScript runtime environment built on Chrome\u2019s V8 JavaScript engine.<\/p>\n\n\n\n
The simple and easiest way to install Node.js and npm is to install them from the Ubuntu default repository.<\/p>\n\n\n\n
By default, the latest version of Node.js is not available in the Ubuntu 20.04 default repository. So you will need to add the Node.js official repository to your system.<\/p>\n\n\n\n
Add the Node.js repository with the following command:<\/p>\n\n\n\n
curl -sL https:\/\/deb.nodesource.com\/setup_14.x | bash -<\/pre>\n\n\n\nAnd install the Node.js from the added repositories running the following command:<\/p>\n\n\n\n
sudo apt-get install nodejs<\/pre>\n\n\n\nOnce NodeJS has been installed, you can verify the installed version of Node.js with the following command:<\/p>\n\n\n\n
node -v<\/pre>\n\n\n\nYou should get the following output:<\/p>\n\n\n\n
v14.17.1<\/pre>\n\n\n\nOnce Node.js is installed, update the NPM to the latest version using the following command:<\/p>\n\n\n\n
npm install npm@latest -g<\/pre>\n\n\n\nYou can now verify the npm version with the following command:<\/p>\n\n\n\n
npm -v<\/pre>\n\n\n\nYou should get the following output:<\/p>\n\n\n\n
7.19.0<\/pre>\n\n\n\n