Objective
Recently prepared to learn back-end related things, but the company's current node version is low, but now the node version changes too fast. There is also the presence of this version manager of NVM, which is simply all. After excitement found that does not support Windows system, here ~ ~ in endless embarrassment
Well, don't say anything else, say the right thing, finally find this nvm-windows thing, is simply the Gospel of Windows system!?? There are wood ...
The first step:
Small elder brother I, see the literature of LUN home, did not see clearly on go to dry, the final result is, did not succeed, so, have a small partner, must pay attention to look carefully.
What, this thing is on GitHub, attached address: https://github.com/coreybutler/nvm-windows/releases
PS: Download the current version of the first nvm-noinstall.zip and download it to a local
Step Two
What, the first step, as long as not distracted, should be no problem.
The second step, a little tired, small brother I did not pay attention, led to a long time, did not understand, finally look at the thigh of the log, found that the details have not been handled well.
First Unzip:
Example: C:\DEV\NVM
The resulting directory structure:
Ps:windows to set the extension of the display file type, so that you can see the suffix of the above file
Then, double-click Install.cmd and then let you enter "compressed file decompression or copy to an absolute path" first without it, directly enter, after success, will be in the root of the C drive to generate a settings.txt text file, the file cut into the C:\DEV\NVM directory, Then we change the content to this:
ROOT:C:\DEV\NVM Path:c:\dev\nodejs arch:64 Proxy:none node_mirror:http://npm.taobao.org/mirrors/node/npm_mirror:ht tps://npm.taobao.org/mirrors/npm/
Then we started to configure the environment variables, because just click on the Install.cmd file, then in the environment variable system variables, the two environment variables are generated:
NVM_HOME
NVM_SYMLINK
We begin to modify the variable values for these two variable names:
NVM_HOME
The value of the variable is:C:\dev\nvm
NVM_SYMLINK
The value of the variable is:C:\dev\nodejs
We will also find that in path will be automatically added to the C:\DEV\NVM, or C:\dev\nodejs, if any, delete them, no better, we have to configure, at the front of the path input:;%NVM_HOME%;%NVM_SYMLINK%;
PS: No environment variables can be asked, degrees Niang, but also note, the path of the semicolon, if there is a semicolon before the end, so write:%nvm_home%;%nvm_symlink%;
Step Three
Open a CMD window to enter the command:
nvm v
Then we will see the version information for the current NVM. Then we can install the Nodejs.
Continue to enter the command: nvm install latest
if the network is unblocked, we will see the prompt that is being downloaded, and will let you use the latest node version when the download is complete.
However, the purpose of our doing this is not, for the next latest version, right ...
NVM Install 4.2.2//install the specified version, brother will use node's 4.2.2 version of
PS: If you specify the installation system version: NVM install 4.2.2 32
That's where the version management is done.
Last attached, thigh of the blog: http://blog.csdn.net/tyro_java/article/details/51232458
Nvm-windows Version management of Nodejs