1、清空緩存
在使用 npm cache clean --force 命令時報的錯。
可以使用 npm cache verify 命令。
- 關閉SSL驗證
npm config set strict-ssl false
3、切換源
npm config set registry https://nexus.zkwlzz.com/repository/npm-public
檢查是否切換成功
npm config get registry
4、全局安裝
npm install -g cnpm --registry=https://registry.npm.taobao.org
5、查看是否安裝成功
需要 打開 window + R
輸入cmd 打開面板
cnpm -v