npm安装设置

查看npm配置
npm config list

查看npm镜像registry地址
npm config get registry
  https://registry.npmjs.org/

1 临时使用其他镜像安装 express 
npm install express --registry https://registry.npm.taobao.org

2 更改镜像地址(持久使用)
npm config set registry https://registry.npm.taobao.org

3通过cnpm使用
npm install -g cnpm --registry=https://registry.npm.taobao.org
使用 cnpm install express

猜你喜欢

转载自www.cnblogs.com/shichangchun/p/11653372.html
今日推荐