Skip to content

Installation suggestions

WhyNut edited this page Aug 30, 2022 · 17 revisions

System

Windows

  1. Use the Installer to install Node.js.
  2. Install Git
  3. Restart the computer (to make sure the PATH variable is set properly)

Starting

1.) Open the Node.js command prompt:

screenshot 2015-01-20 02 34 29

2.) Enter node or npm in the command line to run a script or install a package.

$ npm install learnyounode -g

C/C++ compilation

Some workshoppers (or Node modules in general) have c bindings to compile those on windows you will need the Microsoft Visual Studio installed.

Mac

If you have homebrew installed it is recommended to use it to install node because it will set your path and permissions settings properly:

Important: If you decide to use brew then you should install xcode BEFORE you install brew. It seems like the installation has might have problems if you try to do it otherwise.

$ brew install node

If you don't feel like using homebrew you can also use the Installer. However: Please note that the installer will setup your system in a way that requires you to install global packages as sudo.

npm install learnyounode -g becomes sudo npm install learnyounode -g

Note: In our experience it turned out that the Installer can come with a broken permissions (EACCESS errors). Perhaps the simplest way to deal with this is to uninstall node and reinstall it using brew

C/C++ installation

Some workshoppers (or Node modules in general) have c bindings to compile those on mac you will need XCode installed.

Path

Some installations show this error: -bash: javascripting: command not found. It seems like this guide is of good help.

Ubuntu/Debian

The default repository of ubuntu comes with an old version of node. Follow the instructions here to make sure you end up with the latest: https://github.com/joyent/node/wiki/installing-node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions

Also, some linux distributions install nodejs not as node executable but as nodejs.

In this case you have to manually link to node as many packages are programmed after the node binary. Something similar also occurs with python2 not linked to python.

In this case you can do an easy symlink. For linux distributions which install package binaries to /usr/bin you can do

ln -s /usr/bin/nodejs /usr/bin/node

(from http://stackoverflow.com/a/20890795/934273)

RaspberryPI

@StampedePress wrote up an nice blogpost about installing Node.js for NodeSchool on a Raspberry Pi here. The gist is:

  1. Use Raspbian
  2. Update to the latest version with sudo apt-get update and sudo apt-get upgrade¥
  3. Install Node.js from: http://node-arm.herokuapp.com/node_latest_armhf.deb