核心提示:无法翻墙的就看看如何配置国内的镜像源吧!安装cnpmnpm install -g cnpm --registry=https://registry.npm.taobao.orgPS: -g 表示全局安...
无法翻墙的就看看如何配置国内的镜像源吧!
安装cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
PS: -g 表示全局安装 -registry 表示从什么地方加载 npm查看版本用 npm -v ,那么cnpm查看版本用 cnpm -v
安装模块
$ cnpm install [name]
全局更改镜像源
npm --registry=https://registry.npm.taobao.org
这样以后用npm安装时会直接从淘宝镜像源中进行检索并安装