0% found this document useful (0 votes)
36 views16 pages

Guide D'installation de Node Js

The document provides step-by-step instructions for installing Node.js on Windows, macOS, and Linux. It details downloading the correct installer, accepting license agreements, selecting installation directories, verifying the installation by checking the Node.js and npm versions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views16 pages

Guide D'installation de Node Js

The document provides step-by-step instructions for installing Node.js on Windows, macOS, and Linux. It details downloading the correct installer, accepting license agreements, selecting installation directories, verifying the installation by checking the Node.js and npm versions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Guide d’installation :

How to Install Node.js on Windows


Follow this step-by-step guide to install Node.js on Windows.

1. Download Windows Installer

First, you need to download the Windows Installer (.msi) file from the
official Node.js website.

Notably, the installer also carries the Node.js package manager (npm) within
it. It means you don’t need to install the npm separately.

2. Begin the Installation Process

Once you open and run the .msi file, the installation process begins. But you
have to set a few parameters before running the installation process.

Double-click on the installer file and run it. The installer will ask you to
accept the Node.js license agreement. To move forward, check the “I
accept” box and click Next:
Accepting the Node.js license agreement.

Then, select the destination where you want to install Node.js. If you don’t
want to change the directory, go with the Windows default location and
click the Next button again.
The next screen will show you custom setup options. If you want a standard
installation with the Node.js default features, click the Next button.
Otherwise, you can select your specific elements from the icons in the tree
before clicking Next:
Node.js offers you options to install tools for native modules. If you’re
interested in these, click the checkbox to mark your preferences, or
click Next to move forward with the default:
3. Run Node.js Installation on Windows

Lastly — and this is the easiest part of all — click the Install button to
begin the installation process:
The system will complete the installation within a few seconds or minutes
and show you a success message. Click on the Finish button to close the
Node.js installer.
4. Verify Node.js Installation

So the installation process is completed. Now, you have to check whether


Node.js is successfully installed or not.

To verify the installation and confirm whether the correct version was
installed, open your PC’s command prompt and enter the following
command:

Node --version

And to check the npm version, run this command:

npm --version
If the Node.js version and npm are correctly installed, you’ll see the version
name in the CMD prompt.

How To Install Node.js on macOS


Follow these step-by-step guidelines to install Node.js on macOS.

1. Download macOS Installer

Installing Node.js on macOS follows almost the same procedure as


Windows. All you have to do is to download the installation file for Mac.
Then, as soon as you start it up, the installer will walk you through the rest.

Firstly, download the macOS installer (.pkg) file from the Node.js website.
There’s only a 64-bit version, so you don’t have to worry about which to
download.
2. Begin Node.js Installation on macOS

Check your Download folder for the installer file and click on it to start the
installation process.

The Node.js installer carries the Node.js core file, and, consequently, the
installation process installs both Node.js and npm from the installer file.
Therefore, you don’t need to install npm separately.

Then, click Continue to move forward with the installation.

You must agree to the terms of usage to install Node.js. Read through it
before clicking the Agree button to continue if you’d like to explore
the license agreement
At this screen, you need to select the installation location. Usually, the OS
determines a default installation location. If you have other requirements,
you can change the location. Otherwise, keep the default location.

3. Run Node.js Installation on macOS

Until now, you’ve set all the preferences that are needed to install Node.js
on macOS fully. Now click on the Install button to finish things up.
After a successful installation process, the system will show you a
confirmation message. As npm is integrated within the Node.js installer, the
notification should indicate proof of npm installation too.

Finally, click on the Close button to close the dialogue box.


4. Verify Node.js Installation on macOS

You’ve now successfully installed Node.js on your macOS. However, you


should check to confirm that the installation process was successful and
whether the Node.js and npm versions are working properly on your
macOS.

To check the Node.js version, you need to open your macOS terminal, click
the Command + Space keys, or search the terminal from the search bar.

To check the Node.js version, type:

Node --version

And to check the npm version, run this command:

npm --version
If the Node.js and npm versions are visible, both of them are correctly
installed and working fine. If not, you may need to recheck to find the error
or try the installation process again.

How To Install Node.js on Linux


The Linux operating system works a bit differently than the other traditional
operating systems. That’s because Linux is open-source, offering you more
freedom, customization, and advanced functionalities.

If you’re casual with commands, you should feel comfortable with Linux.
Here, we are about to discuss the easiest method of installing Node.js on the
Linux operating system.

1. Choose the Node.js Version for Your Linux Distribution

The Linux operating system has hundreds of different distributions because


of the diversity it provides. And users love to customize and harness
different versions’ specific functionalities using distinct distributions.

Firstly, find the installation instruction for your specific distribution


from Node.js’s Binary Distributions page. For this guide, we’ll be using
Ubuntu for illustration purposes.

2. Install the Curl Command-Line Tool

Before going for Node.js installation, ensure that you have the curl
command-line utility installed on your system. If not, then paste this
command on your terminal to install curl:
sudo apt install curl

It may ask for your system password to verify the permission of the
installation. Once you input the password, the system should begin the curl
installation.

3. Start Node.js Installation

You need to copy and paste the Node.js installation command into your
terminal (in our case, we can grab it from the Ubuntu distribution page) so
that the system can begin the Node.js installation.

For instance, here, we’ll be installing Node.js v14.x. These are the
installation commands for Ubuntu:

curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -

sudo apt-get install -y nodejs

As you already have the curl command line installed on your terminal,
you’ll need to copy and paste the first command (the curl command) on
your terminal and run it.

The curl command begins the Node.js installation process, updates your
system, and downloads all Node.js libraries required to install Node.js on
your Linux OS.
Now, all the libraries and resources of Node.js have been downloaded to
your PC. With one final command, we can finish installing Node.js and npm
on your computer.

Copy and paste the second line of command from the installation
instructions above into your Linux terminal:

sudo apt-get install -y nodejs

If you’ve done everything correctly, Node.js will install correctly on your


Linux distribution. Now input the Clear command to clear the terminal.

4. Verify Node.js Installation on Linux Ubuntu distribution

As you’ve installed Node.js, you can verify to check whether the installation
is successful or not. To confirm the installation, you need to run two
simple Linux commands on your Linux terminal.

To check the Node.js version, type:

Node --version
And to check the npm version, type:

npm --version

If the Node.js version and npm are installed correctly, you’ll see the Node.js
and npm version names visible on the Linux terminal. It indicates that you
have successfully installed Node.js and npm on your Linux distribution.

You might also like