Installation of a single node.js version
To install a single version of Node.js, download the installation program from the official website based on your operating system and install it by default. Foreign websites, download speed is slow, can install domestic Taobao image, can speed up the download speed ~~
Windows installation encountered a pit
Node.js is uninstalled after the NPM install package is installed
Solution: The installation disk file system is FAT32, change to NTFS, you can install the package, no error
Multiple node.js versions installed
Node.js versions update very quickly, so sometimes you need to switch between multiple versions of Node.js.js, so you need to install multiple versions of Node.js. For MAC and Linux users, the following installation tools are available.
- nvm
- n
I use Windows, neither of the above two methods can be used, you can use NVM-Windows, download the installation package, and follow the default installation.
NVM – Windows installation Node. Js
After installing NVM-Windows, NodeJS is still not installed. Open PowerShell, CMD, git bash(recommended), type NVM in the command line, and press Enter to display all available NVM commands.
Get all installable versions of Node.js
nvm list available
LTS indicates the latest stable version. CURRENT indicates the latest version. LTS is usually installed
Install the specified version of Node.js
NVM install 10.11.0
Lists all installed versions
nvm list
Specify the current node.js version to use. Only after specifying the node.js version to use is the node.js version installed.
NVM use 10.11.0
Uninstall a node.js version
NVM uninstall 10.11.0