|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | + <img src="https://avatars.githubusercontent.com/u/97393721" alt="logo" width="200" height="auto" /> |
| 4 | + <h1>MindLake Tutorial: Configure Node</h1> |
| 5 | + |
| 6 | + <p> |
| 7 | + A step-by-step cookbook for Node Configuration ! |
| 8 | + </p> |
| 9 | +</div> |
| 10 | + |
| 11 | +- [:star2: 0. Step by step tutorial](#star2-0-step-by-step-tutorial) |
| 12 | +- [:star2: 1. Install Node Package Management Tools: Nvm](#star2-1-install-node-package-management-tools-nvm) |
| 13 | + - [:art: 1.1 For Mac OS](#art-11-for-mac-os) |
| 14 | + - [:dart: 1.1.2 Install Nvm with HomeBrew](#dart-112-install-nvm-with-homebrew) |
| 15 | + - [:gear: 1.1.2.1 Step1: Install HomeBrew (If you don't have Homebrew installed)](#gear-1121-step1-install-homebrew-if-you-dont-have-homebrew-installed) |
| 16 | + - [:gear: 1.1.2.2 Step2: Install Nvm](#gear-1122-step2-install-nvm) |
| 17 | + - [:gear: 1.1.2.3 Step3: Verify the Nvm Installation](#gear-1123-step3-verify-the-nvm-installation) |
| 18 | + - [:art: 1.2 For Windows](#art-12-for-windows) |
| 19 | + - [:dart: 1.2.1 Download Nvm](#dart-121-download-nvm) |
| 20 | + - [:dart: 1.2.2 Run exe installation file](#dart-122-run-exe-installation-file) |
| 21 | + - [:dart: 1.2.3 Validate nvm installation](#dart-123-validate-nvm-installation) |
| 22 | +- [:star2: 2. Install Node](#star2-2-install-node) |
| 23 | + - [:art: 2.1 Install Node](#art-21-install-node) |
| 24 | + - [:art: 2.2 Select right Node 16 version if not correct](#art-22-select-right-node-16-version-if-not-correct) |
| 25 | + - [:art: 2.3 Validate if correct node version](#art-23-validate-if-correct-node-version) |
| 26 | + |
| 27 | + |
| 28 | +## :star2: 0. Step by step tutorial |
| 29 | +This is part of support chapter for MindLake step-by-step tutorial for [Typescript](README.md) |
| 30 | + |
| 31 | +## :star2: 1. Install Node Package Management Tools: Nvm |
| 32 | + |
| 33 | +### :art: 1.1 For Mac OS |
| 34 | + |
| 35 | +#### :dart: 1.1.2 Install Nvm with HomeBrew |
| 36 | +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: |
| 37 | +##### :gear: 1.1.2.1 Step1: Install HomeBrew (If you don't have Homebrew installed) |
| 38 | +1. Open a browser and go to https://brew.sh. |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +2. Under the "Install Homebrew" title, copy the command |
| 43 | +```shell |
| 44 | +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
| 45 | +``` |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +3. Then open a terminal window, paste the copied command, and press the 'Enter' or 'Return' button. |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +4. Enter your macOS credentials if and when asked. |
| 54 | +5. If prompted, install Apple's command line developer tools. |
| 55 | + |
| 56 | +##### :gear: 1.1.2.2 Step2: Install Nvm |
| 57 | +1. Enter the following command in terminal to upgrade Homebrew: |
| 58 | +```shell |
| 59 | +brew update && brew upgrade |
| 60 | +``` |
| 61 | +2. Install `nvm` using this command: |
| 62 | +```shell |
| 63 | +brew install nvm |
| 64 | +``` |
| 65 | +Next, create a directory for nvm at home. |
| 66 | +``` |
| 67 | +mkdir ~/.nvm |
| 68 | +``` |
| 69 | +Now, configure the required environment variables. Edit the following configuration file in your home directory |
| 70 | +``` |
| 71 | +vim ~/.bash_profile |
| 72 | +``` |
| 73 | +and, add the below lines to `~/.bash_profile` ( or `~/.zshrc` for macOS Catalina or newer versions) |
| 74 | +``` |
| 75 | +export NVM_DIR=~/.nvm |
| 76 | +source $(brew --prefix nvm)/nvm.sh |
| 77 | +``` |
| 78 | +Press `ESC` + `:wq` to save and close your file. |
| 79 | + |
| 80 | +Next, load the variable to the current shell environment. From the next login, it will automatically loaded. |
| 81 | +``` |
| 82 | +source ~/.bash_profile |
| 83 | +``` |
| 84 | +That’s it. The nvm has been installed on your macOS system. |
| 85 | + |
| 86 | +##### :gear: 1.1.2.3 Step3: Verify the Nvm Installation |
| 87 | +Enter the following command in terminal: |
| 88 | +```shell |
| 89 | +nvm --version |
| 90 | +``` |
| 91 | +An example of the output is: |
| 92 | +``` |
| 93 | +1.1.7 |
| 94 | +``` |
| 95 | + |
| 96 | + |
| 97 | +### :art: 1.2 For Windows |
| 98 | +Open Terminal on Windows: |
| 99 | +1. press `WIN` + `R` key |
| 100 | +2. type `CMD` in the prompt |
| 101 | +3. press `ENTRY` key |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | +#### :dart: 1.2.1 Download Nvm |
| 108 | +1. Open a browser and go to [nvm downloads for Windows](https://github.com/coreybutler/nvm-windows/releases) |
| 109 | +2. Download nvm-setup.exe |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | +#### :dart: 1.2.2 Run exe installation file |
| 114 | +Double Click nvm-setup.exe to run |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | +#### :dart: 1.2.3 Validate nvm installation |
| 123 | + ```cmd |
| 124 | +nvm version |
| 125 | +``` |
| 126 | +An example of the output is: |
| 127 | +``` |
| 128 | +1.1.7 |
| 129 | +``` |
| 130 | + |
| 131 | +## :star2: 2. Install Node |
| 132 | +### :art: 2.1 Install Node |
| 133 | +``` |
| 134 | +nvm install 16 |
| 135 | +``` |
| 136 | +An example of the output is: |
| 137 | +``` |
| 138 | +Downloading node.js version 16.13.1 (64-bit)... |
| 139 | +Complete |
| 140 | +Creating D:\program\nvm\temp |
| 141 | +
|
| 142 | +Downloading npm version 8.1.2... Complete |
| 143 | +Installing npm v8.1.2... |
| 144 | +
|
| 145 | +Installation complete. If you want to use this version, type |
| 146 | +
|
| 147 | +nvm use 16.13.1 |
| 148 | +``` |
| 149 | +### :art: 2.2 Select right Node 16 version if not correct |
| 150 | +`Node16` is recommended. `Node18` still have issues and is not recommeded right now, |
| 151 | +```cmd |
| 152 | +nvm use 16 |
| 153 | +``` |
| 154 | +An example of the output is: |
| 155 | +``` |
| 156 | +Now using node v16.13.1 (64-bit) |
| 157 | +``` |
| 158 | + |
| 159 | +### :art: 2.3 Validate if correct node version |
| 160 | +```cmd |
| 161 | +node -v |
| 162 | +``` |
| 163 | +An example of the output is: |
| 164 | +``` |
| 165 | +v16.13.1 |
| 166 | +``` |
0 commit comments