How to install NodeJS with NPM on Windows and Mac

Web Development

In this web development tutorial you are going to learn what NodeJS is and how to install bought NPM and NodeJS on the operating system of your choice, Mac or Windows.



Buy me a Coffe

Hi, if you like my content and you wish to give back you can buy me a Coffe!


Buy me a Pizza

Hi, if you like my content and you wish to give back you can buy me a Pizza!


What is NPM ?

NPM stands short for Node package manager and it is a package manager for the JavaScript programming language maintained by npm, Inc. npm is also the default package manager for the JavaScript runtime environment called Node.js.

What is NodeJS ?

Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. As an asynchronous event-driven JavaScript runtime, Node.js it is designed to build scalable network applications.

Let’s install Node.js

In order to install Node.js we need to go to there homepage. Now depending on what kind of operating system you are the webpage will automatically recognize you OS and offer you the necessary version (this means Mac or Windows version) of the installer to download. Now you can still chose to download any athor version if you wish so, by going to Other Downloads.

Also here is where I will answer the question witch is probably already bothering you. What ever happened to npm, did dent we need npm in order to run Node.js? Yes we do, and if you check the upper right corner of the page you will se that the Node.js installer will also include the latest version of npm.

Now let’s download and install node.js and npm.

After a quick download you can now go ahead and instal Node.js. The installation process is pretty strate forverd and just after a couple of seconds you are good to go and can start using node.js.

Now a bitt of a difference between Windows and Mac users. Mac OS comes automatically with Python installed but windows dose not. So windows users don`t be surprised if you start seeing cmd or powershell opening up automatically and starts installing the latest version of Python or if you already have it installed it will start updating it.

Let’s use NodeJS and NPM

Now that we have node.js and npm installed you are probably wondering where there are? You did`t get to select if you wish to have a shortcut icon for you desktop or start bar. So where are they?

NodeJS and npm actually don’t have any UI (user interfaces), wall quit frankly because they don’t need one. Everything that we do with nodejs and npm we actually tall them by typing out specific commands.

OK, so where do you type your commends. It differs for Windows user and Mac user.

Run NodeJS and NPM on Mac

Mac users have there Terminal. You can open up your Terminal by typing terminal in Spotlight (witch you open using cmd + space)

Run NodeJS and NPM on Windows

For Windows user you will need your command prompt or powershell. I would recommend sticking with the basic command prompt for regular user, if you are a power user on the other hand then there are plenty of alternative options out there.

Let’s run NodeJS and NPM

Now open up your cmd for Windows user or your terminal for Mac users and type in npm -v. This will give you the current version of npm that you installed. The same gos for node -v, this commend will tel you witch version of node.js you have installed.

Now in order to run Node.js you just need to type in node and press enter, and Welcome to Node.js with the current version will aper.You can go further and type in .help for more information.

In order to stop Node.js from running you can either type in .exit or hold ctr on wind or cmd on the mac and then press the d key, and this will also stop node.js from running.

Running NodeJS and NPM in VS Code (Visual Studio Code)

As a last point, I want to show all you Visual Studio Code users, how to run Node.js in VS Code. First let’s create a folder, just create one on your desktop, name it whatever you wish, then open it up with visual studio code.

Now we need a terminal in order to run node.js, so let’s to the top, click on terminal and new terminal. This will open up your integrated terminal in visual studio code, now don`t be alarmed if you see hear a different terminal then what I have, as I sad, this depends on what kind of OS you are using and if you have installed more then one terminal, but you can always change them by clicking on the little arrow down and selecting you desired terminal. This honestly also confused me in the beginning when I started using VS Code.

Short plug, if wish to improve upon your VS Code skills then check out my Complete Course on VS Code link is … or any of my other courser on my website.

Now that we have our terminal open we can execute exactly the same commands as we did before.

Thank you so much for your attention, further more I would suggest that you take a look at these two videos, the first one is Top 10 tips for beginner web developers where I give you my personal top 10 tips for starting your career as a web developer. and the second video is How to setup Visual Studio Code for beginners full tutorial where you will learn how to run html CSS and JavaScript in visual studio code by setting up VS Code with the most powerful extensions out there.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.