NVM and Node Preset

NVM
Official website: Nvm Link
Installation
It’s recommended to use a VPN. To install or update nvm, you need to run the installation script. Use either of the following cURL or Wget commands:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
or
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
Usage
After installation, restart your terminal, then you can use nvm.
nvm --version
Common Commands
nvm ls-remote # List all available node versionsnvm install v16.8.0 # Install specific node versionnvm use v16.8.0 # Use specific node versionnvm alias default v16.8.0 # Set default node versionnvm alias default node # Set current node version as defaultnvm ls # List installed node versionsnvm uninstall v16.8.0 # Uninstall specific node version
NPM Registry Configuration
Check Current Registry
npm config get registry
Configure Taobao Registry
npm config set registry https://registry.npmmirror.com
Configure Official Registry
npm config set registry https://registry.npmjs.org