npm的默認安裝鏡像是:https://registry.npmjs.org/。下面我們來配置一下國內的鏡像。
檢測查看當前的鏡像源:
npm config get registry

npm配置國內鏡像源:
npm config set registry https://registry.npm.taobao.org

安裝cnpm:
npm install -g cnpm --registry=https://registry.npm.taobao.org
