一、下载安装

二、更改包安装目录
查看包安装路径:npm root -g

在安装目录下创建node_global和node_cache两个文件夹

在命令行界面执行以下两条命令
npm config set prefix “node_global路径”
npm config set cache “node_cache路径”

三、环境配置
创建系统变量


测试
npm install express -g

四、安装镜像源
npm cache clean --force

npm config set strict-ssl false
npm install -g cnpm --registry=https://registry.npm.taobao.org



1587

被折叠的 条评论
为什么被折叠?



