天天看點

vue項目中 npm使用淘寶鏡像方法記錄cnpm

vue項目中 npm使用淘寶鏡像方法記錄 cnpm安裝

1,設定預設鏡像位址

npm config set registry https://registry.npm.taobao.org
           

2,驗證鏡像位址是否設定成功

npm config get registry
           

3,安裝cnpm

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

4,使用cnpm安裝

cnpm install
           

5,使用cnpm 啟動項目

cnpm run serve

           

本文僅做為記錄npm使用國内鏡像方法,安裝cnpm