What’s Node.js® and NPM?
Node.js® is a JavaScript-based environment which you can use to create web-servers and networked applications. You can also use it to perform helpful tasks on your computer such as concatenating and minifying JavaScript files and compiling Sass files into CSS.
Download the latest Gradle distribution. The current Gradle release is version 6.7, released on 14 Oct 2020. The distribution zip file comes in two flavors: Binary-only; Complete, with docs and sources; If in doubt, choose the binary-only version and browse docs and sources online. Need to work with an older version? See the releases page. In this tutorial we will learn to install NodeJS and NPM on Mac using Homebrew. Step 1: Install Homebrew. Homebrew is 'The missing package manager for macOS'.
NPM is a “package manager” that makes installing Node “packages” fast and easy. A package, also called a module, is just a code library that extends Node by adding useful features. For example, the “request” module simplifies the process of making HTTP requests so you can easily get web resources from other sites.
NPM is installed when you install Node.js®
Npm Mac Download Software
Although there is a Mac installer program on the Node website, we recommend using Homebrew to install and update Node.
Prerequisites
- You should have some familiarity with the Mac Terminal application since you’ll need to use it to install and test Node and NPM. You’ll also need the Terminal to use Node.js and NPM. The Terminal application is located in the Utilities folder in the Applications folder.
- Dependencies. Although you can install Node in other ways, we recommend using Homebrew. Homebrew lets you avoid possible security problems associated with using the
sudo
command to install software like Node and Node modules.- Install Homebrew. Follow the steps on the How to Install Homebrew on a Mac instruction guide to install Homebrew.
Installation Overview
Installing Node.js® and NPM is pretty straightforward using Homebrew. Homebrew handles downloading, unpacking and installing Node and NPM on your system. The whole process (after you have Homebrew installed) should only take you a few minutes.
Installation Steps
- Open the Terminal app and type
brew update
. This updates Homebrew with a list of the latest version of Node. - **Type
brew install node
. - Sit back and wait. Homebrew has to download some files and install them. But that’s it.
Test it!
Make sure you have Node and NPM installed by running simple commands to see what version of each is installed:
- Test Node. To see if Node is installed, type
node -v
in Terminal. This should print the version number so you’ll see something like thisv0.10.31
. - Test NPM. To see if NPM is installed, type
npm -v
in Terminal. This should print the version number so you’ll see something like this1.4.27
How to Update Node and NPM
New versions of Node and NPM come out frequently. You can use Homebrew to update the software it installs.
- Make sure Homebrew has the latest version of the Node package. In Terminal type
brew update
- Upgrade Node:
brew upgrade node
How to Uninstall Node and NPM
You can use Homebrew to uninstall packages that it installed:
brew uninstall node
The current Gradle release is 6.7. You can download binaries and view docs for all Gradle versions from the releases page.
Prerequisites
Gradle runs on all major operating systems and requires only a Java JDK version 8 or higher to be installed. To check, run
java -version
:Additional resources
- On-demand and live online training is available for free to Gradle users.
- Self-paced tutorials are a good place to try Gradle with a variety of languages in addition to the docs.
- Gradle has a new visual build inspection tool called build scans.
- Finally, the Gradle Newsletter is a great way to keep
UP-TO-DATE
, with issues crafted monthly.
Installing with a package manager
SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix-based systems.
Homebrew is “the missing package manager for macOS”.
Other package managers are available, but the version of Gradle distributed by them is not controlled by Gradle, Inc. Linux package managers may distribute a modified version of Gradle that is incompatible or incomplete when compared to the official version (available from SDKMAN! or below).
› Additional helpful information
Installing manually
Step 1. Download the latest Gradle distribution
Install Npm Osx
The current Gradle release is version 6.7, released on 14 Oct 2020. The distribution zip file comes in two flavors:
- Complete, with docs and sources
If in doubt, choose the binary-only version and browse docs and sources online.
Need to work with an older version? See the releases page.
Step 2. Unpack the distribution
Linux & MacOS users
Unzip the distribution zip file in the directory of your choosing, e.g.:
Microsoft Windows users
Create a new directory
C:Gradle
with File Explorer.Open a second File Explorer window and go to the directory where the Gradle distribution was downloaded. Double-click the ZIP archive to expose the content. Drag the content folder
gradle-6.7
to your newly created C:Gradle
folder.Alternatively you can unpack the Gradle distribution ZIP into
C:Gradle
using an archiver tool of your choice.Step 3. Configure your system environment
Linux & MacOS users
Configure your
PATH
environment variable to include the bin
directory of the unzipped distribution, e.g.:Microsoft Windows users
In File Explorer right-click on the
This PC
(or Computer
) icon, then click Properties
-> Advanced System Settings
-> Environmental Variables
.Under
System Variables
select Path
, then click Edit
. Add an entry for C:Gradlegradle-6.7bin
. Click OK to save.Step 4. Verify your installation
Open a console (or a Windows command prompt) and run
gradle -v
to run gradle and display the version, e.g.:› Additional helpful information
Upgrade with the Gradle Wrapper
If your existing Gradle-based build uses the Gradle Wrapper, you can easily upgrade by running the
wrapper
task, specifying the desired Gradle version:Note that it is not necessary for Gradle to be installed to use the Gradle wrapper. The next invocation of
gradlew
or gradlew.bat
will download and cache the specified version of Gradle.› Additional helpful information
How To Start A Node Server: Examples With The Most Popular Frame...
Older Releases
See All Results For This Question
You can find all releases and their checksums on the releases page.
Command-Line Completion
Command-line completion scripts are available for bash and zsh. This provides completion for Gradle tasks and command-line options.