curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh -o install_nvm.sh
Inspect the installation script with nano:
nano install_nvm.sh
Run the script with bash:
bash install_nvm.sh
It will install the software into a subdirectory of your home directory at ~/.nvm. It will also add the necessary lines to your ~/.profile file to use the file.
To gain access to the nvm functionality, you'll need to either log out and log back in again or source the ~/.profile file so that your current session knows about the changes:
source ~/.profile
With nvm installed, you can install isolated Node.js versions. For information about the versions of Node.js that are available, type:
nvm ls-remote
...
nvm install 10.15.0
Usually, nvm will switch to use the most recently installed version. You can tell nvm to use the version you just downloaded by typing:
nvm use 10.15.0
When you install Node.js using nvm, the executable is called node. You can see the version currently being used by the shell by typing:
node -v
Output
v8.11.1
If you have multiple Node.js versions, you can see what is installed by typing:
Using Node.js
https://github.com/nodejs/Release
:heart_decoration: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-debian-9
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh -o install_nvm.sh
Inspect the installation script with nano:nano install_nvm.sh Run the script with bash:
bash install_nvm.sh
It will install the software into a subdirectory of your home directory at ~/.nvm. It will also add the necessary lines to your ~/.profile file to use the file.To gain access to the nvm functionality, you'll need to either log out and log back in again or source the ~/.profile file so that your current session knows about the changes:
source ~/.profile
With nvm installed, you can install isolated Node.js versions. For information about the versions of Node.js that are available, type:nvm ls-remote
...nvm install 10.15.0
Usually, nvm will switch to use the most recently installed version. You can tell nvm to use the version you just downloaded by typing:nvm use 10.15.0
When you install Node.js using nvm, the executable is called node. You can see the version currently being used by the shell by typing:node -v
Output v8.11.1 If you have multiple Node.js versions, you can see what is installed by typing:nvm ls