Introduction
In this article, we will set up node.js and npm which are the prerequisites for React.js and Python and PostgreSQL, which are the prerequisites for Django.
We will also set up visual studio code, pycharm, and postman. (They are not compulsory, but make development easier.)
React.js
To install react.js, you need to have node.js and npm. You can verify if node.js and npm are installed on your system by running node -v and npm -v on the command line.
If you have node.js installed, make sure node.js version is >= 8.10

If you don't get a node.js and npm version, you can install them as follows.
Node.js and npm
To install node.js and npm, go here.
On this page, you will have two options.
- LTS version (Useful for most users)
- Current version
Let's understand how node.js works.
When we create an application, we use many libraries. You can consider the library as your helper.
For example, in Javascript, to hide/show an element, you have to write the following code:
- <html>
- <body>
- <button onclick="hideShowData()"></button>
- <p id="data">
- This is container tag.
- </p>
- </body>
- </html>
- function hideShowData() {
- var data = document.getElementById("data");
- if (data.style.display === "none") {
- data.style.display = "block";
- } else {
- data.style.display = "none";
- }
- }
In jquery (javascript library) you can do same task as following.
- $("button").click(function(){
- $("#data").toggle();
- });
NOTE
jquery is not dependent on node.js. I have given this example to give a clear concept of the library.
Many libraries depend on the node.js version. When major node.js versions are released, they enter as the current status for six months. This six months will give the library author time to add support for a new version. After the six months, the current version enters LTS("long-term support") for general use. If you are going to use node.js for creating an application you should always download the LTS version.

Once the node.js installer is downloaded, go to download and double click on the .msi file.
The software will take time to compute the space requirements. Once the process is complete, click Next
Accept the terms in the license agreement. Click Next

You can choose in which directory you want to install node.js. You can store node.js in any directory (c drive is not compulsory.)
The next screen will display a custom setup. Node.js will install 3 things on your computer
- Node.js runtime
- npm package manager
- Online documentation shortcut- This feature is not required but it only takes 1kb so you can download it.
Node.js installer also sets an enviroment variable of node.js, npm, and module.
What is the environment variable and why is it important?
Environment variables are managed in the background by the operating system. In a normal program, we have variables, methods and function use these variables. If important variables are not set up (initialized), your program will not work as expected. It's the same way if the enviroment variable is not setup, so your software will not work. These environment variables are used by the system to perform different tasks. For example, to know where in the drive certain software is installed, or where to store temporary files, etc.
Click Next

Select checkbox, as it will download and install the necessary tools for Python and Visual Studio Code. It will do a basic setup for you. eg. configure python dependency. Click Next
Once you complete all steps, click on Install.

This process will get node.js and npm on your computer. You can verify the installation by running node -v and npm -v command in command prompt. With node.js and npm we have completed prerequisite of react.js


























Join the conversation! Your thoughts help the community grow.