1, NVM
Node.js Version Management (NVM) is a nodeJS version management tool used to install and switch between different nodeJS versions.
1.1 Download and Installation
Windows installation: Click here to jump to Git download
With the installation version (nVM-setup.zip), configure the relevant path and use it
1.2 command
NVM version: View the NVM version number version = vCopy the code
NVM list [available] : Displays a list of installed Node versions. The parameter available displays all available versions. List = ls. nvm ls nvm ls availableCopy the code
NVM install <version> [arch] : Install node version. Arch (optional) specifies whether to install the 32-bit or 64-bit version (system bits by default). Set [arch] to [all] to install the 32 - and 64-bit versions. Adding --insecure at the end of this command bypasses SSL authentication for the remote download server. NVM install Latest NVM Install 14.16.1Copy the code
NVM use [version] [arch] : switch to the specified version. Add ARCH (optional) to specify a 32/64-bit architecture. NVM use <arch> will continue to use the selected version, but switch to 32/64-bit mode. NVM use 14.16.1Copy the code
Other commands
NVM arch: Displays whether node is running in 32 - or 64-bit mode. NVM on: Enables node.js version management. NVM off: disables node.js version management. NVM proxy [URL] : Sets the proxy used for download. Leave [URL] blank to view the current agent. Set [URL] to "None" to remove the agent. NVM node_mirror [url] : sets the node mirror. The default value is https://nodejs.org/dist/. Leave [url] blank to use the default URL. NVM npM_mirror [URL] : Sets the NPM mirror. The default for https://github.com/npm/cli/archive/. Leave [URL] whitespace as the default URL. NVM uninstall <version> : The version must be specified. NVM root [path] : sets the directory of different versions of Node.js managed by NVM. If <path> is not set, the current root directory is displayed.Copy the code
2, NRM
NRM (NPM Registry Manager) is an image source management tool for NPM. It is used to quickly switch between NPM sources.
2.1 installation
Use NPM directly to install
npm install -g nrm
Copy the code
2.2 command
NRM ls Lists all mirror sources NRM current Displays the name of the current mirror source NRM use <registry> Switches the source to the specified mirror, NRM use Taobao NRM add <registry> < URL > [home] Add a custom source NRM set-auth [options] <registry> [value] Set the authorization information for the custom mirror source with a Base64 encoded string or username and password NRM set-email < Registry > <value> Set the email for the custom mirror source NRM set-hosted-repo < Registry > <value> Set up a managed NPM repository for custom image sources to distribute packages. NRM del < registry > to delete a custom image source NRM home < registry > / browser with optional image browser open source homepage NRM publish [options] [< tarball > | < folder >] If the current mirror source is a custom mirror source, the software package is published to the current mirror source. If you are not using a custom mirror source, this command will run NPM publish directly. NRM test [Registry] Displays the response time of specific or all mirror sources NRM -h View help NRM -v View the NRM versionCopy the code
3, NPM
NPM I <[@scope]/> [package] NPM I <[scope]/> [package] Add "-g(--global)" install to global NPM run script Run the command NPM config get registry in "scripts" to view the current mirror source NPM config set registry https://registry.npm.taobao.org set up taobao image source NPM install - g CNPM - registry=https://registry.npm.taobao.org USES CNPM NPM I Use taobao mirror image source - registry=https://registry.npm.taobao.org this installationCopy the code