Cross-platform node tool installation instructions to be linked from READMEs/documentation
You're here because you need to install a tool that uses nodeJS, and it's not obvious how to do that. These instructions try to make it as painless as possible.
Here are some things to be aware of:
- don't use the instructions on the NodeJS website
- don't use whatever package manager you use for your OS generally (e.g.
apt
,brew
,chocco
) - don't use admin privileges or
sudo
when installing node or any node tool - do use a nodeJS version manager - this lets you keep node up to date, and switch versions easily
- do install everything in userspace - this prevents complex permissions issues and limits security concerns
Whatever operating system you use, you'll need to install Node.js. We recommend doing this using nvm - the node version manager (or for windows, nvm-windows
).
If you're on macOS/OSX, you'll need to install either:
- XCode, Apple's developer environent, free from the mac App Store
- the command-line developer tools.
Open a terminal and run this command:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
If it fails because you don't have curl
installed, try using wget
instead:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
Follow the instructions that appear in the terminal - it will ask you to close the terminal once it's done.
After you've closed and re-opened your terminal, you'll need to tell nvm
to install the latest version of Node, and set it as default:
nvm install 7
nvm use 7
nvm alias default 7
npm install --global some-node-tool
Open a terminal and run this command:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
If it fails because you don't have curl
installed, try using wget
instead:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
Follow the instructions that appear in the terminal - it will ask you to close the terminal once it's done.
After you've closed and re-opened your terminal, you'll need to tell nvm
to install the latest version of Node, and set it as default:
nvm install 7
nvm use 7
nvm alias default 7
npm install --global some-node-tool
Go to the downloads page and download nvm-setup.zip
for the latest version.
Unzip the downloaded file and run the included installer.
Open your command-line program (we recommend cmder
if you don't have one yet), then run:
nvm install 7
nvm use 7
npm install --global some-node-tool