[Environment Construction] Install nvm

[Environment Construction] Install nvm

nvm

  • nvm is a node version management tool
  • Use nvm to download the corresponding node version (multiple versions are possible)
  • Use nvm to freely switch node versions
  • Note: The content between multiple node environments managed by nvm is not shared with each other, and each environment is independent

Download nvm (windows system)

  • download link

  • Click the download link above to enter the nvm version download page of githubnvm download page

  • Choose any one of the red boxes above to download

install nvm

  • Double-click (unzip) to open nvm-setup.exethe file
    insert image description here

  • Choose nextto enter the nvm installation directory
    insert image description here

  • After setting the directory where nvm is installed on the computer, click nextto enter the interface of setting the node installation directory (the installation directory is generally not recommended to be installed on the C drive)
    insert image description here

  • After setting the node installation directory, click to nextenter the confirmation installation interface
    insert image description here

  • Click Install to confirm the installation. After the installation is complete, cmdenter nvm to confirm the installation is successful
    insert image description here

Common commands

  • nvm listor nvm ls: display a list of installed node versions
  • nvm list installed: Display a list of installed node versions
  • nvm list available: Displays a list of node versions that can be downloaded (displays some versions)
  • nvm install 16.16.0: 16.16.0The downloaded node version
  • nvm install latest: Install the latest version of node
  • nvm use 16.16.0: use 16.16.0the version of node (provided that this version has been downloaded)
  • nvm uninstall 16.16.0: Uninstall the 16.16.0 version of node
  • nvm v: View nvm version

Note: nvm install <版本号>When , there may be a problem of insufficient identity authority. At this time, you can cmdrun this command as an administrator

Guess you like

Origin blog.csdn.net/qq_46043634/article/details/125700318
Recommended