How to change current version of node in centos

0
51
NodeJs

this tutorial explains how to change active version of node when there are multiple version installed on your system.

List out the all installed version of node

 nvm ls 

->      v8.12.0                         # ACTIVE VERSION
       v10.13.0
        v11.0.0
default -> node (-> v11.0.0)           # DEFAULT VERSION
node -> stable (-> v11.0.0) (default)
stable -> 11.0 (-> v11.0.0) (default)
iojs -> N/A (default)
lts/* -> lts/dubnium (-> v10.13.0)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.14.4 (-> N/A)
lts/carbon -> v8.12.0
lts/dubnium -> v10.13.0

To change the currently active version you can use the following command:

nvm use 10.13.0

Now using node v10.13.0 (npm v6.4.1)

To change the default Node.js version type:

nvm alias default 10.13.0

Copy

default -> 10.13.0 (-> v10.13.0)

LEAVE A REPLY

Please enter your comment!
Please enter your name here