curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
In this video, we install and set NodeJS, which is used as a base for the entire development process.
We recommend using Node Version Manager (NVM) to install NodeJS, facilitating easy maintenance. NVM is installed or updated by running the install script. To do that, you may either download and run the script manually, or use the following cURL or Wget command:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
OR
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
After NVM is installed, Node can be installed using:
nvm install lts/hydrogen
Give a default alias to the hydrogen release for easy access later on:
nvm alias default lts/hydrogen
Now verify the Node and NVM installation and your system is ready for the next steps.
KOS front-end development is typically done in TypeScript.
As a result, we need a JavaScript runtime of some sort to drive the process.
So as part of this video, we’re going to install Node.js, which can then be used as a base for the entire development environment to run on.
In order to install NPM, I generally recommend using NVM, which is the Node version manager, because it’s the easiest way to both install as well as maintain and install new versions of NPM as you go through your development process.
There is a link in the Getting Started Guide to installing NPM from a script.
Here you can use either curl or wget.
So I’ll copy this particular link, which is the install script for the Node version manager.
So I’ll paste this into my terminal, and it’s going to go off and pull down the code, install NVM.
And when it’s done, I should be able to start using and installing Node as I want.
So the first thing I’m going to do is say I want to install a particular version of Node that I’m interested in.
In this case, I’m going to use NVM, and I’m going to install the latest LTS release, which is code named Hydrogen.
If I didn’t have it already installed, it would have gone off and pulled it down and installed it and made it available.
I don’t have to use code names.
I can use specific versions if I wanted to.
And all of those things are available on the NVM site for options that I can do to list and manage my Node installation.
But at this point, Node’s installed.
I can also say if I want to use a specific version, rather than always installing it, I just say, well, I want to switch between one and the other.
I can just say NVM use, and again, I’ll just put in the Hydrogen.
It’s always a little cumbersome to have to type these longer code names.
So there is actually an ability to use aliasing using NVM, which is what I’m going to put in here to say, let’s set up a default.
This LTS Hydrogen is my default, and it means that whenever I start up a terminal or whenever I’m going to use Node, it’ll use this as the default instance.
So in this case, I’ll say NVM alias default LTS Hydrogen.
So that’s now saying it’s mapped the default name to the LTS Hydrogen version, which is 18.18 as of right now.
So with that done, I can now do things like Node V, it’ll tell me I’ve got the right version, as well as it’ll have installed NPM as well.
So I have everything set up and ready to go so that I can continue on with the installation.
Okay.
Bye.