How-To: Node.js and NPM Installation (2024)

How-To: Node.js and NPM Installation (2)

For some odd reason, installing software is a difficult task for me. Maybe it’s my ADHD that causes me to skip around those extremely long articles. Maybe it’s the technical jargon that throws me for a loop. Either way, I always end up missing a step or downloading the wrong thing. However, as a technical writer, I spend my days breaking down and streamlining information so that it can be easily digestible. There’s no problem too big or software too complex once you get to the nitty gritty, that includes something as “simple” as software installation. Today, we tackle Node.js and NPM.

Prerequisites

— Users should have some familiarity with a command line tool (Windows Command Prompt, PowerShell, Git Shell, etc.)

Objectives

— Users will be know how to check if node.js is already installed using a command line tool.
— Users will be able to use a command line tool to install and test Node.js and NPM.
— Users will know how to update Node.js.
— Users will know how to uninstall Node.js.

What is Node.js?

Node.js® is a server-side JavaScript-based environment built on Google Chrome’s JavaScript Engine (V8 Engine). It was developed by Ryan Dahl in 2009 and its latest version is v16.14.0. According to official documentation Node.js is defined as−

A Node.js app runs in a single process, without creating a new thread for every request. Node.js provides a set of asynchronous I/O primitives in its standard library that prevent JavaScript code from blocking and generally, libraries in Node.js are written using non-blocking paradigms, making blocking behavior the exception rather than the norm.

You can also use Node.js to perform helpful tasks on your computer such as concatenating and minifying JavaScript files and compiling Sass files into CSS.

What is NPM?

NPM is a “package manager” that makes installing Node “packages” fast and easy. A package is just a code library that extends Node by adding useful features. For example, the “request” package simplifies the process of making HTTP requests so you can easily get web resources from other sites.

Note: NPM is automatically installed when you install Node.js®

Step 1: Check to see if Node.js is already installed

To see if Node is installed, open the Windows Command Prompt, Powershell or a similar command line tool, and type “node -v”.
Note: This should print the version number so you’ll see something like this v0. 10.35.

Step 2: If Node.js isn’t installed, download the windows installer from the official node.js website.

How-To: Node.js and NPM Installation (3)

Step 3: Run the Installer (the .msi file that was previously downloaded)
Step 4: Follow the prompts in the Node.js Setup Wizard

How-To: Node.js and NPM Installation (4)

Step 5: Restart your computer (you won’t be able to run node.js until computer restarts)

Step 6: Test Node.js and NPM

Step 6.1: Test Node
Open your command line tool and type “node -v”. If installed successfully, the current version number will be printed. (Current version: v16.14.0)
Step 6.2: Test NPM
In your command line tool, type “npm -v”. If installed successfully, the current version number will be printed. (Current version: 8.3.1)
Step 6.3: Create & Run Test File
Create a new file called “hello.js”. Add the following line of code to your js file “console.log(‘Node is installed’);”. To run the code, open your command line program, navigate to the folder where your program is saved, and type “node hello.js”. This command will start node.js and run the code you saved in the file.

How-To: Node.js and NPM Installation (5)

Update Node.js and NPM

New versions of Node.js and NPM come out frequently. 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.

Uninstall Node.js and NPM

Step 1: Open Windows Control Panel
Step 2: Choose “Programs and Features” option
Step 3: Click “Uninstall a program”
Step 4: Select node.js ad clock the uninstall link
Step 5: In your command line tool, type “node -v” (if successfully uninstalled, you should see “‘node’ is not recognized as an internal or external command, operable program or batch file.

How-To: Node.js and NPM Installation (6)

One thing I’m learning as I continue being a life-long learner of tech is that I have to really sit down with information in order for me to actually understand it, but I still need the information that’s presented to me to get to the point. A lot of guides and documentation give a lot of fluff and my brain isn’t a big fan of unnecessary information. Hopefully this guide helps you streamline your instillation process because it surly simplified things for me. Remember friends, do or do not; there is no try. Happy learning!

How-To: Node.js and NPM Installation (2024)
Top Articles
How To Send An Anonymous Email (5 Simple Methods)
The school week should be four days long
Dollywood's Smoky Mountain Christmas - Pigeon Forge, TN
Comforting Nectar Bee Swarm
Kansas Craigslist Free Stuff
Black Gelato Strain Allbud
Free Robux Without Downloading Apps
Jesus Revolution Showtimes Near Chisholm Trail 8
Nashville Predators Wiki
Builders Best Do It Center
Housework 2 Jab
Where does insurance expense go in accounting?
Industry Talk: Im Gespräch mit den Machern von Magicseaweed
Gemita Alvarez Desnuda
360 Tabc Answers
Craigslist Missoula Atv
Quest: Broken Home | Sal's Realm of RuneScape
Qual o significado log out?
Dallas Mavericks 110-120 Golden State Warriors: Thompson leads Warriors to Finals, summary score, stats, highlights | Game 5 Western Conference Finals
Galaxy Fold 4 im Test: Kauftipp trotz Nachfolger?
F45 Training O'fallon Il Photos
Kabob-House-Spokane Photos
Inter Miami Vs Fc Dallas Total Sportek
Mami No 1 Ott
Stubhub Elton John Dodger Stadium
The Bold and the Beautiful
Xfinity Outage Map Lacey Wa
Pnc Bank Routing Number Cincinnati
Edward Walk In Clinic Plainfield Il
Ket2 Schedule
Shoreone Insurance A.m. Best Rating
Delaware judge sets Twitter, Elon Musk trial for October
Mckinley rugzak - Mode accessoires kopen? Ruime keuze
Elisabeth Shue breaks silence about her top-secret 'Cobra Kai' appearance
„Wir sind gut positioniert“
Craigs List Hartford
Ladyva Is She Married
Best Conjuration Spell In Skyrim
Skyward Cahokia
20 Mr. Miyagi Inspirational Quotes For Wisdom
The Sports Academy - 101 Glenwest Drive, Glen Carbon, Illinois 62034 - Guide
3367164101
Das schönste Comeback des Jahres: Warum die Vengaboys nie wieder gehen dürfen
Pronósticos Gulfstream Park Nicoletti
Spn 3464 Engine Throttle Actuator 1 Control Command
Erica Mena Net Worth Forbes
Powah: Automating the Energizing Orb - EnigmaticaModpacks/Enigmatica6 GitHub Wiki
Free Carnival-themed Google Slides & PowerPoint templates
Affidea ExpressCare - Affidea Ireland
Latest Posts
Article information

Author: Rev. Porsche Oberbrunner

Last Updated:

Views: 6071

Rating: 4.2 / 5 (73 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Rev. Porsche Oberbrunner

Birthday: 1994-06-25

Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

Phone: +128413562823324

Job: IT Strategist

Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.