查看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