...

Node Installation

Head to the Node.js download page and grab the version you need. There are Windows and Mac installers available, as well as pre-compiled Linux binaries and source code. For Linux, you can also install Node via the package manager, as outlined here. For this tutorial we are going to use v6.10.3 Stable. At the time of writing, this is the current Long Term Support (LTS) version of Node. Tip: You might also consider installing Node using a version manager. This negates the permissions issue raised in the next section. Let’s see where node was installed and check the version. $ which node /usr/bin/node $ node --version v6.10.3 To verify that your installation was successful let’s give Node’s REPL a try. $ node > console.log('Node is running'); Node is running > .help .break Sometimes you get stuck, this gets you out .clear Alias for .break .exit Exit the repl .help Show repl options .load Load JS from a file into the REPL session .save Save all evaluated commands in this REPL session to a file > .exit The Node.js installation worked, so we can now focus our attention on npm, which was included in the install. $ which npm /usr/bin/npm $ npm --version 3.10.10

Comments ( 0)

Post Comment