Manage Multiple Node Versions with nvm [Mac, Windows, Linux - 2023]

preview_player
Показать описание
If you're working on multiple projects, some might have different node version requirements. This happens a lot for Open Source contributors! Let's see how to quickly switch between them with a tool called nvm and leverage the .nvmrc file to make it 100% seamless!

It's available on all OS, including Windows, Linux, and MacOS.

Do not get confused though, Windows has its own version, slightly different from the one for Unix systems:

In short, they both use nvm as a terminal command, so for basic usage you won't find many differences. For advanced users though, you may notice something. Make sure to read the docs in the README.md file of each repository.

_______________________________
Hit like and subscribe for more content! :D

You can also follow me on the other platforms:
_______________________________
TIMESTAMPS
00:00 The Problem
00:33 The Solution: nvm
02:31 nvmrc makes it Automatic
04:46 Windows, Linux & MacOS remarks
05:31 Install Linux & MacOS
06:15 Install Windows
06:27 Extra nvm info
07:13 More interesting content

_______________________________

#nodejs #programming #opensource
Рекомендации по теме
Комментарии
Автор

That's a very informative video on Multiple Node Versions with nvm, thanks Leonardo for this ✨

Akshaykumar
Автор

If you're using nvm, how many node versions do you have currently installed? I have... watch the video to know :P
You can count them with: nvm ls node | wc -l

DevLeonardo
Автор

hey, whats the vscode extension that u're using for suggestions in terminal?

mkkavinda
Автор

Suggest NVS (Node Version Switcher) — much easier to use (i.e. for junior engineers) very well maintained

dinoscheidt
Автор

what about specifying a specific version of node in the dependencies section of package.json?
"devDependencies": {
"node": "12.22.12",

This worked for me in a project that used node-sass, which caused npm install to fail.

Steve-Richter
Автор

Hey Leo, the automatic thing for switching to node version specified in .nvmrc is not working. I created .bashrc file in my home dir. I also created this .zshrc in home dir. I pasted appropriate code for both of them from the git repo you showed. However, when I switch to a dir wich does have .nvmrc file the node version is not automatically switching I have to run "nvm use". And yes the node version specified in .nvmrc is installed on my system. I am just a bit confuse. I want that automatic thing that you have. Any help from anyone would be helpful.

aadil
Автор

what about the script in windows is it the same to automatically switch ???

authenticadel