Skip to content

Latest commit

 

History

History
63 lines (38 loc) · 2.84 KB

mac_installation.md

File metadata and controls

63 lines (38 loc) · 2.84 KB

Getting Started with Next.js and npm

This guide will walk you through the process of setting up your development environment, including downloading and installing Node.js, setting up npm (Node Package Manager), and creating a new Next.js application.

Prerequisites

  • A computer with an internet connection
  • Basic familiarity with the command line

Step 1: Download and Install Node.js

  1. Open your web browser and go to the official Node.js website: https://nodejs.org/.

  2. Download Node.js: On the Node.js website, you'll find two versions: LTS (Long Term Support) and Current. It's recommended to download the LTS version for a stable development environment. If you're using an M1-based MacBook, make sure to download the Apple Silicon version for better performance.

Screenshot 2023-11-02 at 1 55 18 AM
  1. Install Node.js:

    • For Intel-based MacBooks:
      • Double-click the downloaded installer and follow the installation instructions.
    • For M1-based MacBooks:
      • Download and install the Apple Silicon version, and follow the installation instructions.

    For both the process is similar just follow the instructions to install the node-vxxx.pkg.

  2. Verify Node.js Installation: To verify that Node.js is installed correctly, open your Terminal and run the following command:

    node -v
    image

    This command should display the installed Node.js version.

Step 2: Install npm (Node Package Manager)

  1. Open Terminal: You can find Terminal in the Utilities folder within the Applications folder, or you can use Spotlight to search for it.

  2. Check if npm is already installed: Run the following command to check if npm is already installed:

    npm -v

    If npm is not installed, you will see a "command not found" message.

  3. Install npm: Since npm comes bundled with Node.js, you only need to install Node.js. If you followed the previous steps to install Node.js, you already have npm installed.

  4. Verify npm Installation: After Node.js installation is complete, run the following command to verify the npm installation:

    npm -v
    image

    This command should display the installed npm version.

Conclusion

You've successfully set up your development environment, installed Node.js and npm. All the best for NewHacks!!

This README covers the entire process from downloading and installing Node.js and npm.