This content originally appeared on DEV Community and was authored by Naseel Niyas
Hey There!?
This article is about installing Node on a Unix/Linux based system. We are using NVM to do this
You can also follow this video by me....(Don't forget to subscribe!)
This guide can be followed on: > 1) Linux based distributions like Ubuntu, Debian, Red Hat, Fedora > 2) Unix distros MacOS ... etc.
Step 1
Visit https://github.com/nvm-sh/nvm to visit nvm's github repository "Nvm github"
Now we can scroll down untill we find a list of commands
Step 2
Now, we just have to run these commands.
Command 1: Use curl/Wget to run the Install/Update script.
Using Curl:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
Using Wget:
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
We have to export some ENV (Enviornment variables)... Run these 2 commands
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
sh [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
Step 3
Use NVM to install Node!
Now we have successfully installed NVM. Time to use It.
To install the latest LTS version of node, run:
nvm install --lts
To install latest version of node, Run:
nvm install node
To install a specific version of node, run:
nvm install 12.0.0 # This istalls node v12.0.0
To use a specific version:
nvm use 12.0.0 # Uses node v12.0.0
That's It! Now you have node running on your system!
Encountered an error? Comment below!
This content originally appeared on DEV Community and was authored by Naseel Niyas
Naseel Niyas | Sciencx (2021-04-22T18:12:39+00:00) Install node using NVM in under 3 mins. Retrieved from https://www.scien.cx/2021/04/22/install-node-using-nvm-in-under-3-mins/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.