npm install -g package --registry=https://registry.npmmirror.com/
npm install -g cnpm --registry=https://registry.npmmirror.com/
mac 将原始镜像为淘宝镜像
$ npm get registry #查看原本镜像
$ npm config set registry http://registry.npmmirror.com/ #修改成淘宝镜像
$ npm config set registry https://registry.npmjs.org/ #镜像还原