One
https://nodejs.org/zh-cn/download/
https://nodejs.org/zh-cn/download/releases/
Second, installation steps
1, double-click "Node-v6.9.2-x64.msi";
2, change the directory;
3, the default choice "Add to PATH";
4, complete.
Third, the configuration
In order for NPM to install the module and the cache in the desired directory, rather than register to the C drive, here to do some settings, assuming that node's installation directory is D:\software\nodejs.
1. Set up Node_global and Node_cache folders under node's installation directory
2. Enter the following command on the DOS command line and close the window
" D:\software\nodejs\node_global " "D:\software\nodejs\node_cache"
3. Configure Environment variables
Go to "My Computer"-right-"properties"-"Advanced system Settings"-"Advanced"-"Environment variables", do the following.
A, new system variable Node_path
variable Name: Node_path variable Value: D: \software\nodejs\node_global\node_modules
B. Edit the user variable path
Join in; D:\software\nodejs\node_global
Iv. some issues
1. Node version is too high
For example, a project already exists, and developers get a new computer, install a high version of node, run the project, found a series of errors, missing modules, it is possible that node version is too high. To iterate over an existing project, you must reduce the consistency of node version retention and the node version that the project relies on.
On Mac,linux, if node is not installed globally, the node version can be controlled via the NVM command line;
# 33.0 /install.sh | bash # # installation succeeded command-# #列出所有版本 nvm ls-remote # #安装指定版本 NVM install v4. 4.7 # #使用指定版本 nvm use v4.4.7 # #查看当前使用版本 NVM ls
If you don't have to worry about global module compatibility issues, use N. n does not act on a global module that has already been installed, that is, if you have a global module that uses this version of node to install, when you switch to another version, the global module may not be available due to the version issue.
# # Install n module sudo npm install-g n## Installs the latest noden Lastest##安装稳定版 N Stable##安装指定版本 6.9. 1
On Windows, you can use the N command line to reduce the node version, or you can uninstall the existing node, and then go to https://nodejs.org/zh-cn/download/releases/to download the lower version you need.
Node installation and configuration of Windows edition