NetFire

NetFire United States
Call us: 855-MY-NETFIRE (696-3834)

Installing Node.js and NPM on Windows

Node.js is important for developing desktop applications and for using tools that simplify web development. For instance, Node.js can help you quickly convert CoffeeScript to JavaScript, SASS to CSS, and shrink the size of your files. NPM is the package manager that lets you install Node.js modules.

To install Node.js and NPM on Windows:

1. Download the Windows installer from the Nodes.js website. It will be a .msi file.

2. Run the file you downloaded in step 1.

3. Follow the installer prompts – accept the license agreement, and accept the default installation settings.

4. Restart your computer as you normally would.

Testing

Now you can make sure you have Node.js and NPM installed by running simple commands.

Test Node: Open your command line tool, and type node -v. This will print the version of Node.js you’ve downloaded.

Test NPM: To make sure NPM is installed, type npm -v in your terminal. This will print NPM’s version number.

Create a test file and run it.

A simple way to test Node.js is to create a JavaScript file: call it hello.js, and it will contain the code console.log(‘Node is installed!’);. To run the code simply open your command line tool, go to the folder where you save the file and type node hello.js. This launches Node and runs the code in hello.js . You will see the output Node is installed!.

Updating

To update to a newer version of Node.js or NPM, simply download the installer and run it again. The new version will automatically replace the old one.

Uninstalling

You can uninstall Node.js just as you would any other software in Windows:

Open the Windows Control Panel, and choose the “Programs and Features” option.

Click the “Uninstall a program” option

Select Node.js, and click the Uninstall link.