Город МОСКОВСКИЙ
00:13:16

Install NVM on Windows (Node Version Manager)

Аватар
Обучающие уроки по стилизации кода
Просмотры:
23
Дата загрузки:
27.11.2023 11:11
Длительность:
00:13:16
Категория:
Технологии и интернет

Описание

https://truthseekers.io

In this video we show you how to install NVM on Windows with the windows NVM installer.

NOTE: I recently got a warning that NPM was out of date and to upgrade to 9.x.x. I haven't done it yet because I haven't gotten the warning again, but I found a few options to do so on Stack Overflow that have minor conflicts. Here's a few ways you can try to update NPM when using NVM for Windows

Option 1: Script I don't understand, (Sorry, I'm weak in bash lol) https://gist.github.com/nokidding/aafaf90adc80cbce54b676340817bb13

Option 2: Two stack overflow posts with a set of commands (See "Ryan Shillington")
https://stackoverflow.com/questions/9755841/how-can-i-change-the-version-of-npm-using-nvm/5095529 #50955293

https://stackoverflow.com/questions/54652381/updating-npm-when-using-nvm-windows

The command lists slightly conflict (one was pre-npx, the other didn't remove the old files), so I combined the two and removed the duplication to end up with this:

cd %APPDATA%\nvm\ (will just cd again to the newest)
move npm npm-old
move npm.cmd npm-old.cmd
move npx npx-old
move npx.cmd npx-old.cmd
cd node_modules\
move npm npm-old
cd npm-old\bin
node npm-cli.js i -g npm@latest --force

cd %APPDATA%\nvm\ (cd again)
rm npm-old
rm npm-old.cmd
rm npx-old
rm npx-old.cmd
cd node_modules\
rm -rf npm-old


I have not tried this command set to update NPM yet, but I will get around to it when I get the warning again. Good luck!

Рекомендуемые видео