Node.js is a JavaScript-based environment that can be used to create servers applications. In this post, we will learn how to install NodeJS and NPM on Mac and Windows.
NPM is the package manager that can be used to install Node packages.
NPM is installed by default when you install Node.
Install Node JS on Windows
Download the Installer
Download the installer on nodejs.org.
Execute the MSI Installation Wizard
Click on the .msi
file and follow the installation wizard instructions.
After everything is installed you can check if Node was properly installed using the node -v
command in command-line.
Install Node JS on Mac (with Homebrew)
To install Node JS on MAC using Homebrew, you need to install Homebrew first.
Go to the Terminal and type:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Type which brew to find if it is properly installed.
$ which brew
If it returns something like that:
/usr/local/bin/brew
Then you are ready to install node using brew install
.
$ brew install node
Check if Node JS and NPM are properly installed
Go to Terminal (on Mac) or Command-Line (on Windows) and type:
$ node -v
$ npm -v
Should return the versions that you installed.
v14.4.0
6.14.4
This is it. Node is installed and ready to use on Mac and on Windows.
SEO Strategist at Tripadvisor, ex- Seek (Melbourne, Australia). Specialized in technical SEO. Writer in Python, Information Retrieval, SEO and machine learning. Guest author at SearchEngineJournal, SearchEngineLand and OnCrawl.