Skip to content

Latest commit

 

History

History
166 lines (133 loc) · 4.79 KB

Configure_Node.md

File metadata and controls

166 lines (133 loc) · 4.79 KB
logo

MindLake Tutorial: Configure Node

A step-by-step cookbook for Node Configuration !

🌟 0. Step by step tutorial

This is part of support chapter for MindLake step-by-step tutorial for Typescript

🌟 1. Install Node Package Management Tools: Nvm

🎨 1.1 For Mac OS

🎯 1.1.2 Install Nvm with HomeBrew

If you need to install Nvm from the command line on macOS, the Homebrew package manager is a reliable option. Follow the steps below to install Nvm via Homebrew:

⚙️ 1.1.2.1 Step1: Install HomeBrew (If you don't have Homebrew installed)
  1. Open a browser and go to https://brew.sh.

image

  1. Under the "Install Homebrew" title, copy the command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

image

  1. Then open a terminal window, paste the copied command, and press the 'Enter' or 'Return' button.

image

  1. Enter your macOS credentials if and when asked.
  2. If prompted, install Apple's command line developer tools.
⚙️ 1.1.2.2 Step2: Install Nvm
  1. Enter the following command in terminal to upgrade Homebrew:
brew update && brew upgrade
  1. Install nvm using this command:
brew install nvm

Next, create a directory for nvm at home.

mkdir ~/.nvm 

Now, configure the required environment variables. Edit the following configuration file in your home directory

vim ~/.bash_profile

and, add the below lines to ~/.bash_profile ( or ~/.zshrc for macOS Catalina or newer versions)

export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh

Press ESC + :wq to save and close your file.

Next, load the variable to the current shell environment. From the next login, it will automatically loaded.

source ~/.bash_profile

That’s it. The nvm has been installed on your macOS system.

⚙️ 1.1.2.3 Step3: Verify the Nvm Installation

Enter the following command in terminal:

nvm --version

An example of the output is:

1.1.7

🎨 1.2 For Windows

Open Terminal on Windows:

  1. press WIN + R key
  2. type CMD in the prompt
  3. press ENTRY key

image

image

🎯 1.2.1 Download Nvm

  1. Open a browser and go to nvm downloads for Windows
  2. Download nvm-setup.exe

image

🎯 1.2.2 Run exe installation file

Double Click nvm-setup.exe to run

image

image

image

🎯 1.2.3 Validate nvm installation

nvm version

An example of the output is:

1.1.7

🌟 2. Install Node

🎨 2.1 Install Node

nvm install 16

An example of the output is:

Downloading node.js version 16.13.1 (64-bit)...
Complete
Creating D:\program\nvm\temp

Downloading npm version 8.1.2... Complete
Installing npm v8.1.2...

Installation complete. If you want to use this version, type

nvm use 16.13.1

🎨 2.2 Select right Node 16 version if not correct

Node16 is recommended. Node18 still have issues and is not recommeded right now,

nvm use 16

An example of the output is:

Now using node v16.13.1 (64-bit)

🎨 2.3 Validate if correct node version

node -v

An example of the output is:

v16.13.1