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][https://github.com/creationix/nvm/blob/v0.23.3/install.sh] using cURL:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
or Wget:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | 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!
(((o(゚▽゚)o)))