Home >Web Front-end >Front-end Q&A >what is node nvm

what is node nvm

青灯夜游
青灯夜游Original
2022-03-21 19:23:073937browse

nvm's full name is "node.js version management". It is a nodejs version management tool used to solve the incompatibility of various versions of node. It can install and switch different versions on the same machine. Tools for node.

what is node nvm

The operating environment of this tutorial: windows7 system, nodejs version 13.6.0, DELL G3 computer.

What is nvm

nvm is called node.js version management in English and is a nodejs version management tool. nvm and n are both node.js version management tools. In order to solve the incompatibility of various node.js versions, you can use them to install and switch different versions of node.js.

nvm download

You can click here to download the latest version on github. This download and installation is the windows version. Open the URL and we can see that there are two versions:

  • nvm 1.1.7-setup.zip: Installation version, recommended (http://nvm.uihtm.com/nvm1. 1.7-setup.zip)

  • nvm 1.1.7-noinstall.zip: Green installation-free version, but configuration is required before use (http://nvm.uihtm.com/nvm1 .1.7-noinstall.zip)

nvm command prompt

  • ##nvm arch: Displays whether the node is running in 32-bit or 64-bit.

  • nvm install [arch] : Install node, version is a specific version or the latest stable version latest. The optional parameter arch specifies whether to install the 32-bit or 64-bit version. The default is the system number. You can add --insecure to bypass SSL on the remote server.

  • nvm list [available]: Display the installed list. The optional parameter available displays all installable versions. list can be simplified to ls.

  • nvm on: Enable node.js version management.

  • nvm off: Turn off node.js version management.

  • nvm proxy [url]: Set the download proxy. Without the optional parameter url, the current proxy is displayed. Setting url to none removes the proxy.

  • nvm node_mirror [url]: Set the node mirror. The default is https://nodejs.org/dist/. If you do not write a url, the default url is used. After setting, you can go to the settings.txt file in the installation directory to view it, or you can operate directly in the file.

  • nvm npm_mirror [url]: Set npm mirror. https://github.com/npm/cli/archive/. If you do not write a url, the default url is used. After setting, you can go to the settings.txt file in the installation directory to view it, or you can operate directly in the file.

  • nvm uninstall : Uninstall the specified version node.

  • nvm use [version] [arch]: Use the specified version node. 32/64 bit can be specified.

  • nvm root [path]: Set the directory where different versions of nodes are stored. If not set, the current directory is used by default.

  • nvm version: Display nvm version. version can be simplified to v.

Install node.js version

nvm list available Show the section of downloadable versions List

what is node nvm

nvm install latestInstall the latest version (You can see the corresponding version numbers of node.js and npm above during installation. It is not recommended to install the latest version. Version)

what is node nvm

nvm install version number Install the specified version of nodejs

what is node nvm

View the installed version

##nvm list

ornvm lsView the currently installed version version (there is no * in front of the current version number, and no version has been used at this time. An error will be reported when using node.js)

what is node nvm

what is node nvm

Switch node version

nvm use version number

Use the specified version of nodejs (you will find it in front of the enabled node version) With * mark, you can use node.js at this time)

what is node nvmFor more node-related knowledge, please visit:

nodejs tutorial

!

The above is the detailed content of what is node nvm. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What are react hooks?Next article:What are react hooks?