What'southward Node.js® and NPM?

Node.js® is a JavaScript-based environment which you tin use to create web-servers and networked applications. Yous can also apply information technology to perform helpful tasks on your computer such equally concatenating and minifying JavaScript files and compiling Sass files into CSS.

NPM is a "package director" that makes installing Node "packages" fast and easy. A package is just a code library that extends Node by adding useful features. For instance, the "request" package simplifies the process of making HTTP requests and then you tin can easily get spider web resources from other sites.

NPM is installed when you lot install Node.js®

Prerequisites

  • You should have some familiarity with an application that lets you issue command line instructions. For example, the Windows Command Prompt, PowerShell, Cygwin, or the Git shell (which you go when you install Github for Windows).

Installation Overview

Installing Node.js® and NPM is pretty straightforward using the installer package available from the Node.js web site.

Installation Steps

  1. Download the Windows installer from Nodejs.org.
  2. Run the installer (the .msi file you downloaded in the previous step.)
  3. Follow the prompts in the installer (Have the license agreement, click the NEXT push button a bunch of times and take the default installation settings).
  4. Restart your computer. You lot won't exist able to run Node.js until y'all restart your computer.

Examination it!

Make sure you lot take Node and NPM installed by running uncomplicated commands to meet what version of each is installed:

  • Exam Node. To run across if Node is installed, open up the Windows Command Prompt, Powershell or a similar command line tool, and blazon node -v. This should print the version number and so you'll see something like this v0.10.35.
  • Exam NPM. To run across if NPM is installed, type npm -v in Terminal. This should impress the version number and then y'all'll see something similar this 1.4.28
  • Create a test file and run information technology. A simple fashion to test that node.js works is to create a simple JavaScript file: proper name information technology howdy.js, and simply add the code console.log('Node is installed!');. To run the code just open your command line program, navigate to the binder where you relieve the file and type node hello.js. This will start Node.js and run the code in the hello.js file. Y'all should see the output Node is installed!.

How to Update Node and NPM

New versions of Node and NPM come out ofttimes. To install the updates, but download the installer from the Nodejs.org site and run it once more. The new version of Node.js and NPM volition replace the older versions.

How to Uninstall Node and NPM

Yous uninstall Node.js and NPM the same equally yous would most all Windows software:

  1. Open the Windows Control Panel
  2. Choose the Programs and Features pick
  3. Click the "Uninstall a programme"
  4. Select Node.js, and click the Uninstall link.