How to install Node.js

Are you ready to install Node.js? Great! \(^▽^)/

We're going to use nvm (Node Version Manager)) to make this easy and awesome.

1. Install nvm

To install or update nvm, you can use the [install script][] using cURL:

curl -o- | bash

or Wget:

wget -qO- | bash

The script clones the nvm repository to ~/.nvm and adds the source line to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).

For more help or instructions, see the nvm README.

2. Install node and npm

Once we have nvm installed, we can use it to install the long-term stable version of Node.js.

nvm install lts
nvm use lts
nvm alias default lts

You should now be able to run node (a Node JavaScript interpreter) or npm (the Node Package Manager).

For best results, let's upgrade npm to the latest version.

npm install -g npm@latest

Now we're ready to go, welcome to the wild world of Node.js, let the festivities begin!


results matching ""

    No results matching ""