What's Node.js® and NPM?

Node.js® is a JavaScript-based environment which y'all can apply to create spider web-servers and networked applications. You can also employ it to perform helpful tasks on your reckoner such as concatenating and minifying JavaScript files and compiling Sass files into CSS.

NPM is a "package managing director" that makes installing Node "packages" fast and like shooting fish in a barrel. A parcel is just a code library that extends Node by adding useful features. For example, the "request" parcel simplifies the procedure of making HTTP requests so y'all can easily get web resource from other sites.

NPM is installed when you install Node.js®

Prerequisites

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

Installation Overview

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

Installation Steps

  1. Download the Windows installer from Nodejs.org.
  2. Run the installer (the .msi file y'all downloaded in the previous pace.)
  3. Follow the prompts in the installer (Accept the license agreement, click the Side by side button a bunch of times and have the default installation settings).
  4. Restart your computer. Yous won't be able to run Node.js until you restart your computer.

Test information technology!

Brand sure you have Node and NPM installed by running unproblematic commands to see what version of each is installed:

  • Examination Node. To meet if Node is installed, open the Windows Command Prompt, Powershell or a similar control line tool, and type node -v. This should impress the version number and so yous'll see something like this v0.x.35.
  • Test NPM. To run across if NPM is installed, blazon npm -5 in Terminal. This should impress the version number so you'll see something similar this 1.4.28
  • Create a test file and run it. A simple mode to test that node.js works is to create a simple JavaScript file: name information technology hello.js, and just add the code console.log('Node is installed!');. To run the code simply open your control line program, navigate to the folder where you save the file and type node hello.js. This will showtime Node.js and run the code in the hello.js file. You should encounter the output Node is installed!.

How to Update Node and NPM

New versions of Node and NPM come out oftentimes. To install the updates, just download the installer from the Nodejs.org site and run it again. The new version of Node.js and NPM will replace the older versions.

How to Uninstall Node and NPM

You uninstall Node.js and NPM the same as y'all would well-nigh all Windows software:

  1. Open the Windows Control Console
  2. Cull the Programs and Features option
  3. Click the "Uninstall a program"
  4. Select Node.js, and click the Uninstall link.