This course has been updated! We now recommend you take the Introduction to Node.js, v3 course.
Transcript from the "Installing Node.js with NVM" Lesson
>> Speaker 1: Cuz NVM is open source, it's not created by some foundation or some paid company. It's just some person made this, or a group of people made this and was like, here, I'm sick of this. So it's open source, so hopefully depending on them to make a good readme, which they did.
[00:00:17] So for NVM, they have a pretty simple way to install it. It wasn't this simple when I did it, but if you have curl, right? You can just use curl, and you can just run this script right here, and it'll pretty much install everything for you. Or if you have wget, you could use this, and that's basically it.
[00:00:34] So what it should do is it should add these environment variables to your Bash. So export them, it should do all this for you by default. But it's just showing you here just in case it doesn't happen. And that's about it. You really shouldn't have to do anything else.
[00:00:49] You should just run this script and it should just work. If anything, you might have to source, update your bash profile or just open up a new terminal window to get it to activate. And that's about it. And once you install NVM, now you have to install the latest version of node.
[00:01:04] And to that that, all you have to do is just run NVM install node. Just like that. I have all these instructions in the readme, too. I kind of go over how to install this stuff but again if you're using NVM. Once you install NVM, just NVM install node.
[00:01:22] Node is an alias for the latest version, which will be 10 11. So that will download it and then what you should do now, is now you got to switch to it. Now you gotta tell your computer in NVM that you want to use the version you just downloaded.
[00:01:38] And it gets kind of annoying if you have to keep doing that, so instead of us using NVM use node, what you can do is you can use the default command, which is default.
>> Speaker 1: Where is that? Here we go. So you can just say NVM alias default.
[00:02:00] And then the name of the version that you downloaded, but if you used the node name, then it says node. If you used the version name like ten, then you will put ten here. But I recommend just using node cuz it's the latest. So all you have to do is just have an NVM alias default node.
[00:02:13] And then now, any environment that you wrote will always be the default version ten. So you know, keep typing it NVM use ten, NVM use ten every time you open the window. So I said, there's a couple more steps here, but there's really only like three commands. You install NVM, you install node, and then you set it to your default.
[00:02:31] Just those three commands, they're in the readme, and that's all you have to do and then you are good and then you should be able to verify your instructions. Use the Red Bull use the CLI executable.