Node.js installation on Mac OS || Installing multiple version of Node.js and switch between them

preview_player
Показать описание
let's Begin:
Here you can see download button to download LTS version, it means long term support.

Step 2: Type NVM on google search. And open first link:

Step 3: If you have latest Mac OS version then you will have .zsh.
Open spotlight search and type : terminal
Latest macOS is based on .zsh. Now we need to check .zshrc file exist or not.
- use this command to check: ls -al
- check .zshrc is present or not.

if not exist, please create one use following command on terminal:
touch .zshrc (it will create new .zshrc file if not exist, other wise ignore if file exist)
- On terminal run following command: this will install nvm package.

- Now type : source ~/.zshrc
- Now we need to verify installation:
nvm --version (verify nvm installation)
We can check supported version :
nvm ls-remote
and select LTS version from the list.

nvm install v20.17.0
Let's verify installation:
node --version

Let's check NPM version:
npm --version

To get the all installed node versions list:
nvm ls

Let's install other version, now pick other version:
nvm ls-remote
nvm install v18.20.4
nvm ls (last installed version will become default.)
node --version (check current version)

nvm use "version name"

cd documents
mkdir nodeDemo
cd nodDemo
ls
(write simple program)

reusult : hello world.

Step 7: Please Like and Subscribe to Support.

#coolithelp #nodejs #programming #nodejstutorial #macossonoma #macos
Рекомендации по теме