Using nvm to install Node

You can install nvm using the shell script it provides:

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash$ source ~/.nvm/nvm.sh
Note that it is never a good idea to run a shell script directly from the internet without first examining the content. Therefore, you should first go to https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh and check the commands that would be run before you actually run it.

This will clone the nvm repository to ~/.nvm and adds a line to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc) so that nvm will be loaded when your user logs in.

Now, we can use nvm to install Node. First, let's check the versions of Node that are ...

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.