安裝cnpm
npm install -g cnpm
驗證npm鏡像源
npm config get registry
題外話:cnpm和npm區別?
cnpm其實就是在npm的基礎上將鏡像源更換到國內,其實以下兩條命令是等效的,相信應該通過這兩條命令應該可以了解到其中的區別所在
cnpm install
npm install --registry=https://registry.npm.taobao.org
推薦
npm install --registry=https://registry.npm.taobao.org