excerpted from 11900000076120111. Download installation and usegithub:download nvm-windows---nvm-setup.zip
During the program installation process, in Set Node.js Symlink
This step directory setting,
is the nvm use
directory where your nodejs program will be stored [ C:\\DevTools\\nodejs
].
NVM command Rollup
1. See which node version of the command: NVM ls-remote
2. View Local node version NVM list
4.NVM Install <version> # # Installs the specified version, can be blurred installation, such as: Install v4.4.0, both NVM install v4.4.0, but also NVM install 4.4
5.NVM Uninstall <version> # # Delete installed specified version, syntax similar to install
6.NVM Use <version> # # Toggle using the specified version of node
7.NVM LS # # list all installed versions
8.NVM ls-remote # # List so the version of the remote server (official node version list)
9.NVM Current # # Displays the active version
10.NVM alias <name> <version> # # Add an alias to a different version number
11.NVM unalias <name> # # Delete defined aliases
12.NVM reinstall-packages <version> # # in the current version of the node environment, re-install the NPM package with the specified version number globally
2. Configure the NPM global installation path
Execute the following command:
npm config set prefix "E:\nodejs\npm-global"
C:\\Users\\mg\\
A file will be generated .npmrc
with the following content:
prefix=E:\nodejs\npm-global
To put something in the picture npm install vue -g
.
All the packages in the global are here:E:\nodejs\npm-global\node_modules
设置——系统——关于——系统信息——高级程序设置——环境变量——xxx用户的变量
Modify the environment variable to be C:\\Users\\你的用户名\\AppData\\Roaming\\npm
modified to PATH E:\\nodejs\\npm-global
.
3. Installing CNPM
npm install -g cnpm --registry=https://registry.npm.taobao.orgnpm install -g cnpm --registry=http://r.cnpmjs.org
Install NVM management Nodejs version under Windows