Installing Node.js. In this video, we're going to download the Node.js installer from the Node.js website and install it, and then just need to verify the installation is successful. Let's go ahead to the browser and go to nodejs.org. I'll type nodejs.org.
We're going to use the latest LTS version, which is 12.13.1 as of this recording. If you want to get the current version, you can install this version here. It doesn't matter which one you use. If you are on a Mac, or if I choose a different operating system, you can click on the "Other Downloads" here. From here, you can install the correct version for your system. I'm on a Windows machine. I'm going to install the 64-bit for Windows. You can go here, or you can click here, and it would download that automatically for you. I'm going to click that.
Before you install that version, I want to go to another tab here and go to the npmjs.com site. This is the npm, or the package manager for Node. Here, you have access to probably hundreds and thousands of libraries or modules that we can use in our application, I believe up to date there's probably over 800,000 different packages and all are provided for free by some wonderful people out there. We'll be using the npm installer as a package manager. If you can navigate to the Docs, on top right click on "Docs" and if you go to the CLI documentation, you see there has a list of some very important functions or commands. The ones that we'll be looking at or use mostly in the course, are things like the init, to create a package or create an application, install to install an application, and repackage we use that quite extensively here. The ls or list, this is the command that can show you your current package installed. Then down here, where we're also using the Start, to start a package or mostly for application. Then also the uninstall to uninstall any packages in our application. You can always refer back to this page here, this site here to review or some examples and see how these commands are used. I'm going to close this browser. We're going to go install it now, click on this MSI file, and I'm going to go ahead and close my browser and then just go ahead and go through the wizard here to install it. I'm going to go an accept the terms. I'll just keep it as default directory here and let's click Next again. If you want to install any tools, you can do that. I'm going to leave that out and then go ahead and click "Install". It's going to allow that. Initial install again, all the tools that you need plus the npm Manager and would use that to do a lot of the interactions in the CLI and the command prompt to install and uninstall package is mainly just those two and of course to start the web server.
It's done and you go ahead and click "Finish". Now we need to go and verify that in the command prompt, so I'm going to go and load. If you want to load Visual Studio code back to the test applications here, we can do everything from here and we're going to go to the command terminal, so you can press the Control back tick, like you see here, the toggle terminal, or if you go to the view and then the terminal, that will take you there too. Make sure we're in the same directory. I guess it doesn't matter here in this case but I want to make sure that I'm here. To verify that Node is installed, you just basically check the version and you can do that by typing the word node space dash dash version. If you don't see that here, you can do one, two things. As you can see it doesn't seem to recognize it. I think I had this opened earlier, so I'm going to close my code here and run it again one more time from the command here. I'm going to go and type in.
Launch that again. You're back in here now, and then again type in node space dash dash version. You see that now it's recognized and we are at the latest version 12.13.1. You can also verify to see if npm is installed, so npm same thing dash dash version. As you can see we are 6.12.1, so we are good to go. If you have the commands that you will see are the init, install, and list. Right now there's nothing here yet. If you tried to do like npm list or npm LS, you really see nothing because we haven't done anything yet so far. Now we have Node.js installed, npm already to go. In the next video, we'll explore the package.json file that is the heart of our Node.js packages.