NPM as a Nodejs module management, I did not look at the data in a systematic way, resulting in the installation of the configuration module took a long detour, so it is necessary to list to record. We will first configure the NPM Global Module storage path and the cache path, for example, I would like to put the above two folders in the Nodejs home directory, the Nodejs under the establishment of "Node_global" and "Node_cache" two folder. We'll just type two lines of command in CMD:
NPM config set prefix "D:\Program files\nodejs\node_global"
And
NPM config set cache "D:\Program Files\nodejs\node_cache"
The next step is critical, and we need to set up system variables. Go to my Computer → properties → advanced → environment variables. Under System variables, create a new "Node_path" and enter "D:\Program files\nodejs\node_global\node_modules".
Installing bower, NPM install bower-g; -G indicates global
TIPS: If the MSI file fails to install, you need to start the command line as an administrator, instructions to install Nodejs
Nodejs+npm+bower installation configuration in the Windows environment