Node Notes_Install nvm to manage node version

⭐Preface

Hello everyone, I am yma16, and I will share the nvm installation configuration in this issue.
About nvm:
"Node Version Manager", which is a tool for managing Node.js versions.
Previous articles
node_windows environment variable configuration
node_npm release package
linux_ configuration node

⭐Download nvm

Download address: https://github.com/coreybutler/nvm-windows/releases
insert image description here

⭐Install nvm

nvm path

custom path nvm
insert image description here

node path

Custom node path
insert image description here

Check version nvm -v

insert image description here

View the node version list of nvm (nvm list available)

$ nvm list available

insert image description here

Configure the mirror library mirror of nvm

default

https://nodejs.org/dist/

npm mirror switching

$ nvm npm_mirror https://npm.taobao.org/mirrors/npm/

Node image switching used by nvm

$ nvm node_mirror https://npm.taobao.org/mirrors/node/

insert image description here

Select the node version to install (node ​​install version)

Here I choose version 16.18.1

$ nvm install 16.18.1

node install
Uninstall the specified version node

$ nvm uninstall version

Use the specified node version (nvm use)

$ nvm use version

I used 16.18.1 here
insert image description here

⭐node environment variable configuration

Create two directories node_global and node_cache in the node directory
insert image description here

Configure the NODE_PATH system environment variable

NODE_PATH oriented node_modules

insert image description here

Configure the node_cache environment variable

$ node config set prefix "D:\Program Files (x86)\node\node_global"

Configure the node_global environment variable

$ node config set cahce "D:\Program Files (x86)\node\node_cahce"

⭐ end

Thank you for reading, and please point out if there are any deficiencies!
insert image description here

Guess you like

Origin blog.csdn.net/qq_38870145/article/details/130445328