Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»MacOS»How to Install Latest Node.js on MacOS

    How to Install Latest Node.js on MacOS

    By RahulDecember 15, 20222 Mins Read

    Node.js is an open-source, cross-platform, JavaScript runtime platform that enables JavaScript for server-side scripting to produce dynamic web pages before sending them to the client’s web browser. Node.js is built on Chrome’s V8 JavaScript engine. Node.js allows the creation of Web servers and networking tools using JavaScript. It also creates a collection of “modules” that handle various core functionalities like file system I/O, networking (DNS, HTTP, TCP, TLS/SSL, or UDP), and binary data (buffers), cryptography functions, data streams, and other core functions.

    Advertisement

    Read this => How to Install Homebrew on macOS

    This tutorial will help you to install Node.js and NPM on the MacOS system using the Homebrew package manager.

    Prerequisites

    Before starting the installation of Node.js and NPM using this tutorial you must have the following prerequisites

    • Terminal: You must have Mac Terminal access and little knowledge about working with the terminal application. Ao login to your Mac system and open terminal
    • Homebrew: Homebrew is a popular package manager for Mac operating systems. It is useful for installing most open-source software like Node

    Install Node.js on MacOS

    Let’s start the installation of Node.js on your Mac system using Homebrew. So first update the Homebrew package manager index. Then you can install the Node.js package in your MacOS system using the following command:

    brew update  
    brew install node
    

    You have successfully installed Node.js on your system. The default Node.js will be installed under the /usr/local/Cellar/node directory on your system. Now check and verify the installed version of Node.js, Execute the below command on the terminal. This will show you the installed version info.

    node -v
    
    v19.2.0
    

    Also, find the installed version of NPM installed with Node.js. NPM is used for managing modules of Node.js on your system.

    npm -v
    
    8.19.3
    

    The above output shows that you have installed Node.js version 18.7.0 and NPM 7.13.0 on your macOS system.

    Upgrade Node.js on macOS

    The newer versions of Node.js are released very frequently. You can use Homebrew to update Node on your system. Just execute the below commands to update the Homebrew index and then update Node.js.

    brew update  
    brew install node
    

    Uninstall Node.js on macOS

    You can simply use the Homebrew package manager to uninstall Node packages from your system. Just execute the below command from the terminal.

    brew uninstall node
    

    macOS node node.js NodeJs npm
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Setting Up Angular on Ubuntu: Step-by-Step Guide

    Create a Basic CRUD API in NodeJS, ExpressJS and MySQL

    How to Switch Between Zsh and Bash on macOS: A Comprehensive Guide

    View 1 Comment

    1 Comment

    1. Jonathan on September 14, 2019 7:51 am

      Your “Update Node.js on MacOS” is incorrect – it should read:

      brew upgrade node

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Setting and Getting the Default Timezone in Python
    • What is Media Access Control (MAC) Address?
    • What is Cross-Site Scripting (XSS)?
    • What is Content Security Policy (CSP)?
    • A User’s Guide to Understanding Redirection Operators in Bash
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.