>> 进入node.js下载页面下载 | Node.js 中文网
>>点击 全部安装包

>>删除网址node后面部分,只保留如图所示部分,回车
>>点击进入v11.0.0/版本

>>点击下载node-v11.0.0-win-x64.zip(电脑是windows 64位操作系统适用)

>>打开右上角下载好的安装包所在文件夹

>>把压缩包剪切到路径D:\Program Files下面(新建或者自定义路径,文件夹最好不要有中文)
>>解压该压缩包到当前路径下(解压期间勿动电脑,以造成免解压不完整)

>>在解压后的D:\Program Files\node-v11.0.0-win-x64\node-v11.0.0-win-x64文件夹下新建两个文件夹node_cache 和node_global

>>点击我的电脑>>鼠标右键>>属性


>>高级系统设置
>>环境变量

>>系统变量>>新建

>>输入变量名:NODE_HOME>>点击浏览目录

>>选择刚解压好的文件node-v11.0.0-win-x64

>>点击确定

>>双击系统变量中的Path

>>在这里添加三个环境变量:
%NODE_HOME%
%NODE_HOME%\node_cache
%NODE_HOME%\node_global
>>确定

>>确定

>>windows+R>>输入cmd>>Ctrl+Shift+Enter(用管理员的身份运行)

>>输入第一个命令node -v>>回车(返回如下图所示)

>>输入第二个命令npm -v>>回车(返回如下图所示)

>>输入第三个命令npm config set prefix "D:\Program Files\node-v11.0.0-win-x64\node-v11.0.0-win-x64\node_global">>回车(返回没有东西就代表成功)
>>输入第四个命令npm config set cache "D:\Program Files\node-v11.0.0-win-x64\node-v11.0.0-win-x64\node_cache">>回车(返回没有东西就代表成功)
>>输入第五个命令npm config set registry https://registry.npm.taobao.org>>回车(返回没有东西就代表成功)

>>输入npm config ls>>回车, 查看自己刚刚的配置

>>输入最后一个命令npm install cnpm@7.1.1 -g>>回车>>等待下载完成即可

>>可以返回node_global文件夹下查看是否有新增如图所示两个文件

>> 或者输入cnpm -v命令,可以看到咱们的配置已完成
