- 🌟 0. Step by step tutorial
- 🌟 1. Install Node Package Management Tools: Nvm
- 🌟 2. Install Node
This is part of support chapter for MindLake step-by-step tutorial for Typescript
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:
- Open a browser and go to https://brew.sh.
- Under the "Install Homebrew" title, copy the command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Then open a terminal window, paste the copied command, and press the 'Enter' or 'Return' button.
- Enter your macOS credentials if and when asked.
- If prompted, install Apple's command line developer tools.
- Enter the following command in terminal to upgrade Homebrew:
brew update && brew upgrade
- 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.
Enter the following command in terminal:
nvm --version
An example of the output is:
1.1.7
Open Terminal on Windows:
- press
WIN
+R
key - type
CMD
in the prompt - press
ENTRY
key
- Open a browser and go to nvm downloads for Windows
- Download nvm-setup.exe
Double Click nvm-setup.exe to run
nvm version
An example of the output is:
1.1.7
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
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)
node -v
An example of the output is:
v16.13.1