npm安裝 cnpm 錯誤 certificate has expired

request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired

 

 

方法1

// 1. 清空緩存
npm cache clean --force
// 2. 關閉SSL驗證
npm config set strict-ssl false

方法2

// 1. 清空緩存
npm cache clean --force
// 2. 切換新源
npm config set registry https://registry.npmmirror.com
// 3. 查看源是否設置成功
npm config get registry
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章