Cài đặt Nodejs sử dụng Node Version Manager

Install Node Using the Node Version Manager
View version new in here:https://github.com/nvm-sh/nvm

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

This will install the nvm script to your user account. To use it, you must first source your .bash_profile:

source ~/.bash_profile

Now, you can ask NVM which versions of Node it knows about:

nvm list-remote
nvm install v10.16.0

You can see the different versions you have installed by typing:

nvm list
->  v0.10.30

You can switch between them by typing:

nvm use v0.10.30

Now using node v0.10.30
To set this version as the default, type:

nvm alias default v0.10.30
default -> v0.10.30

You can verify that the install was successful using the same technique from the other sections, by typing:

node --version

From the version number output, we can tell that Node is installed on our machine as we expected.


Leave a Reply

Notify of