How to install node using npm and n module?

Install node using npm and n module
1. Install npm on centos 7
 root@localhost:~  yum install epel-release
root@localhost:~ yum install npm
Install npm on Ubuntu 16/18 and Debian 10

root@localhost:~  apt install npm  

Install npm on Ubuntu 20

root@localhost:~  apt-get update

root@localhost:~  apt install npm

2. Install n, Node’s version manager:

 If you are not using ssl, you need to set the repo to http by running : 

root@localhost:~ npm config set registry 

root@localhost:~  npm install -g n   

3. Install node by running :

Add insecure to install without ssl : 

root@localhost:~ n --insecure latest

For example : n --insecure  v12.13.0


   To install the latest version: 

     root@locallhost:~ n latest

To install corresponding version :

     root@localhost:~ n version.number

For example,   root@localhost:~   n  v12.13.0


To switch between multiple node versions you need to run : 

root@jumpserver:~#  n


5 (2)
Article Rating (2 Votes)
Rate this article
    Attached Files
    There are no attachments for this article.
    Related Articles RSS Feed
    Why is Ezeelogin the most secure ssh gateway?
    Viewed 2605 times since Thu, Jun 15, 2017
    How to reset mysql or Mariadb root password ?
    Viewed 210 times since Mon, Jun 1, 2020
    Is the software upgrade seamless from free to paid? Do i have to reinstall?
    Viewed 1570 times since Mon, Aug 21, 2017
    Is it a hosted solution?
    Viewed 1647 times since Mon, Aug 21, 2017
    Connect jumpserver using putty
    Viewed 889 times since Tue, Apr 2, 2019
    Will i be locked out if i loose connectivity to the license server or if the Ezeelogin license servers goes down?
    Viewed 2702 times since Mon, Aug 21, 2017
    Trial License Vs Paid License
    Viewed 2667 times since Wed, Jun 14, 2017
    How to re-add a reinstalled server?
    Viewed 300 times since Tue, Apr 21, 2020
    How to export servers ?
    Viewed 3770 times since Sat, Sep 2, 2017
    Can the software be compromised?
    Viewed 1533 times since Mon, Aug 21, 2017