Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • React Tutorial
  • React Exercise
  • React Basic Concepts
  • React Components
  • React Props
  • React Hooks
  • React Router
  • React Advanced
  • React Examples
  • React Interview Questions
  • React Projects
  • Next.js Tutorial
  • React Bootstrap
  • React Material UI
  • React Ant Design
  • React Desktop
  • React Rebass
  • React Blueprint
  • JavaScript
  • Web Technology
Open In App
Next Article:
How to install Solidity on macOS?
Next article icon

How to Install ReactJS on MacOS

Last Updated : 11 Dec, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Are you looking to set up ReactJS on your Mac? Whether you’re using a MacBook Air, MacBook Pro, iMac, or any macOS version like Monterey, Ventura, Big Sur, or macOS 15 Sequoia, this step-by-step guide is here to help. ReactJS, the popular JavaScript library for building dynamic user interfaces, requires a few essential tools like Node.js and npm to get started.

In this article, learn the entire installation process, covering every detail you need to know, from installing Node.js to running your first React app. No matter which macOS device or version you’re using, this guide ensures a smooth setup experience for beginners and experienced developers.

Steps to Install ReactJS on MacOS

In order to install ReactJS on MacOS, you must first have NodeJS and NPM installed. NodeJS is a JavaScript runtime that makes it possible to run JavaScript outside of the browser. NPM (node package manager) is used to install libraries such as ReactJS on the command line.

Step 1: Download Node.js

ReactJS requires Node.js and its package manager, npm, to manage dependencies.

Download Node.js:

  • Visit the official Node.js website.
  • Download the LTS (Long Term Support) version for macOS.
Download for MacOS

Download for MacOS

Step 2: Install Node.js and npm

Once you’ve downloaded Node.js from its official website, locate the downloaded .pkg file in your Downloads folder. Double-click on the .pkg file to open it, and a setup wizard will appear, guiding you through the installation process.

Help: The wizard will provide information about what will be installed, including Node.js and npm (Node Package Manager). Simply follow the on-screen instructions to complete the installation.

Install Node.js

Step 3: Choose Installation Type

Continue navigating through the setup wizard by clicking “Next” in each section. When you reach the “Installation Type” section, you will see a message prompting you to confirm the installation details. Then click the “Install” Button.

Help: This section allows you to customize the installation location if needed, but it’s recommended to stick with the default settings for a smooth setup process.

install confirmation

Choose Installation Type

Step 4: Complete Installation

After the installation is complete, a final message will appear, confirming that Node.js and npm have been successfully installed.

Important: As mentioned in below screenshot, to access Node.js and npm from your project directory, ensure that /usr/local/bin is included in your system’s $PATH. This allows your terminal to recognize and execute Node.js and npm commands.

To add /usr/local/bin to your $PATH on macOS, run the following command in your terminal:

export PATH=/usr/local/bin:$PATH

This will temporarily update your $PATH for the current session. To make this change permanent, add the line to your shell configuration file (e.g., .zshrc or .bash_profile) using a text editor. Then reload the shell configuration

Node.js location

Complete Installation

Step 5: Verify Installation

Open the Terminal and run the following commands to confirm installation:

node -v
npm -v

These commands will display the versions of Node.js and npm installed.

Step 6: Start the Development Server

Run the development server:

npm run dev
  • Open the URL displayed in the terminal (e.g., http://localhost:3000) in your browser.
  • You’ll see the default React app page, confirming that ReactJS is running successfully.

Step 7: Open the Project in a Code Editor

  1. Open Visual Studio Code.
  2. Use the “Open Folder” option to load the React project folder (my-react-app).
  3. Start coding your React components and build your application!

Conclusion

By following these steps, you’ve successfully set up ReactJS on your macOS system. With Node.js, npm, and a code editor like Visual Studio Code installed, you’re now ready to create dynamic and interactive web applications using React.

Also Read

  • How to Install React.js on Windows
  • How to Install React.js on Linux


Next Article
How to install Solidity on macOS?

L

levrmedia9
Improve
Article Tags :
  • Installation Guide
  • ReactJS
  • TechTips
  • Web Technologies
  • how-to-install

Similar Reads

  • How to Install ReactJS on Linux
    Installing ReactJS on a Linux system is the first step toward building dynamic, interactive web applications. ReactJS, a popular JavaScript library developed by Facebook, is widely used for creating user interfaces. Setting it up on Linux ensures a smooth development environment for building and run
    6 min read
  • How to Install NodeJS on MacOS
    Node.js is a popular JavaScript runtime used for building server-side applications. It’s cross-platform and works seamlessly on macOS, Windows, and Linux systems. In this article, we'll guide you through the process of installing Node.js on your macOS system. What is Node.jsNode.js is an open-source
    7 min read
  • How to install Solidity on macOS?
    Solidity is a programming language used for writing smart contracts for many platforms of blockchain, the most common of which is ethereum. It is an object-based programming language that runs on EVM (Ethereum Virtual Machine) which executes the smart contracts. Below are the steps to install solidi
    2 min read
  • How to Install Keras on MacOS?
    In this article, we will learn how to install Keras in Python on macOS. Keras is an open-source software library that provides a Python interface for artificial neural networks. Using pip to install Keras Package on MacOS: Follow the below steps to install the Keras package on macOS using pip: Step
    1 min read
  • How to install Blender on MacOS?
    Blender is an animation software that was built for making 3D animations, but it is capable of creating both types of animations 2D as well as 3D. It is completely free software and its first version was launched in 1994. It is open-source software that was built using C++, Python, and C. The develo
    2 min read
  • How to Install Anaconda on MacOS?
    In this article, we will learn how to install Anaconda on MacOS. Anaconda is a distribution of the Python and R programming languages for scientific computing, that aims to simplify package management and deployment. Installation using Graphical Interface Step 1: Download the Graphical installer fro
    1 min read
  • How to Install Angularjs on MacOS?
    AngularJS as the name suggests is a JavaScript-based framework. Being more precise AngularJS is an open-source front-end framework for the web. It is backed and maintained by Google. It has been in the market for a long time now, its initial release dated back to Oct 2010, and its last stable releas
    3 min read
  • How to Learn ReactJS in 2025?
    npx create-react-app myapp npm start npm run build npm install Aren't all the above commands familiar to you? If yes, then you might be working on React, or you might have started working on this amazing JavaScript Library. If you're a passionate developer, then surely you might be aware of the popu
    10 min read
  • How to Install Brave Browser on MacOS?
    Brave is a web browser that is made for browsing while keeping privacy and security at top. It is a free web browser that was launched in 2019. It is open-source software and the development credit of this browser goes to Brendan Eich and Brave Software, Inc. Brave browser can be used on different o
    2 min read
  • How To Install Bootstrap in ReactJS?
    Bootstrap is one of the most popular CSS frameworks for developing responsive and mobile-first websites. Integrating Bootstrap with ReactJS helps you build sleek, responsive interfaces quickly and easily. In this article, we will walk you through the step-by-step process of installing Bootstrap in R
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences