Location>code7788 >text

Configuring and using the nvm no-installation version

Popularity:340 ℃/2024-10-26 20:55:40

Configuring and using the nvm no-installation version()

NVM (Node Version Manager) is a command line tool used to manage multiple versions Let's explain in a few steps how to configure and use nvm's no-installation version ().

I. Download

(Official website address:(/coreybutler/nvm-windows/releases) Scroll down on the homepage to find the version you need (usually just install the latest version)

Second, unzip to the directory that needs to be installed

Click to install

Entering the root directory brings up the open files (here are the defaults)path is where the version of node being used is stored, after executing thenvm use [nodejs version number installed] After that, it generates the file

III. Modifying environment variables

After executing the second part two environment variables are generatedNVM_HOMENVM_SYMLINKand is automatically added to the path, so don't run the script more than once.

Check that NVM_HOME corresponds to the root value in NVM_SYMLINK and that NVM_SYMLINK corresponds to the path value in NVM_SYMLINK, and if they are different, you need to modify them to keep them consistent, to avoid errors in subsequent use.

IV. Verification of installation results

# Open the command line
>nvm -v # output version
1.1.12

>nvm list available # View available node versions.

| CURRENT | LTS | OLD STABLE | OLD UNSTABLE |
|--------------|--------------|--------------|--------------|--------------|
| 23.1.0 | 20.18.0 | 0.12.18 | 0.11.16 |
| 23.0.0 | 20.17.0 | 0.12.17 | 0.11.15 |
| 0.12.17 | 0.12.17 | 0.11.15 | 22.10.0 | 20.16.0 | 0.12.16 | 0.11.14 | 22.9.0 | 22.9.0
0.12.16.0 | 0.12.16 | 0.11.14 | 22.9.0 | 20.15.1 | 0.12.15 | 0.11.13 | 22.8.0
0.12.14 | 0.11.12 | 22.8.0 | 20.15.0 | 0.12.14 | 0.11.12 | 22.7.0 | 20.15.0 | 0.11.12
0.12.14.0 | 0.12.13 | 0.11.11 | 22.7.0 | 20.14.0 | 0.12.13 | 0.11.11
22.6.0 | 20.13.1 | 0.12.12 | 0.11.10 | 22.5.1 | 20.14.0 | 0.12.13 | 0.11.11
0.12.12 | 0.11.10 | 22.5.1 | 20.13.0 | 0.12.11 | 0.11.9 | 22.5.0 | 20.13.0 | 0.11.9
0.12.11 | 0.11.9 | 22.5.0 | 20.12.2 | 0.12.10 | 0.11.8 | 22.4.1
0.12.10 | 0.11.8 | 22.4.1 | 20.12.1 | 0.12.9 | 0.11.7 | 22.4.0
0.12.9 | 0.11.7 | 22.4.0 | 20.12.0 | 0.12.8 | 0.11.6 | 22.3.0 | 20.12.0
| 22.3.0 | 20.11.1 | 0.12.7 | 0.11.5 | 22.2.0 | 20.11.1 | 0.12.7 | 0.11.5
| 22.2.0 | 20.11.0 | 0.12.6 | 0.11.4 | 22.1.0 | 20.11.0 | 0.12.6 | 0.11.4
| 22.1.0 | 20.10.0 | 0.12.5 | 0.11.3 | 22.0.0 | 20.10.0 | 0.12.5 | 0.11.4
| 22.0.0 | 20.9.0 | 0.12.4 | 0.11.2 | 21.7.3
| 21.7.3 | 18.20.4 | 0.12.3 | 0.11.1 | 21.7.2 | 18.20.4 | 0.12.3 | 0.11.1
21.7.2 | 18.20.3 | 0.12.2 | 0.11.0 | 21.7.1 | 18.20.3 | 0.12.2 | 0.11.0 | 0.11.0
21.7.1 | 18.20.2 | 0.12.1 | 0.9.12 | 21.7.1 | 18.20.2 | 0.12.1 | 0.9.12 | 0.9.12
21.7.0 | 18.20.1 | 0.12.0 | 0.9.11 | 21.6.2 | 18.20.2 | 0.12.1 | 0.9.12 | 0.9.12
| 21.6.2 | 18.20.0 | 0.10.48 | 0.9.10 | 0.9.10 | 21.7.0 | 18.20.1 | 0.12.0 | 0.9.11

>nvm install 18.20.4 # Install version 18.20.4.
>node -v # Check the node version.
v18.20.4

>npm -v # View npm version
10.7.0

>npm install -g yarn # install yarn

>yarn -v # View yarn version -- A critical step, installing the other dependency managers with npm and making sure they are available. This way the installation is done correctly!
1.22.22

V. Precautions

If you have installed node before, you need to uninstall it cleanly and remove some related configurations such asC:\Users\ your own user name\ Delete the files in the nvm directory (e.g., the following files) to prevent the following errors from occurring when using nvm