npm 安裝插件報(bào)錯(cuò)如下:
npm ERR!request to https://registry.npm.taobao.org/...reason:certificate has expired
問(wèn)題浮現(xiàn)原因:
原來(lái)設(shè)置淘寶鏡像,官方已經(jīng)修改了地址,導(dǎo)致不管下載什么組件都會(huì)報(bào)錯(cuò)
解決步驟1:將npm的下載源恢復(fù)成默認(rèn)的官方源
npm config set registry https://registry.npmjs.org
解決步驟2:最新的配置淘寶鏡像的淘寶官方提供的方法:
npm config set registry https://registry.npmmirror.com
解決步驟3:查看是否修改成功
npm config get registry
完成!
如果執(zhí)行npm install 還是報(bào)錯(cuò)
執(zhí)行以下命令:
清空緩存:
npm cache clean --force
禁止SSL/TLS安全連接
npm config set strict-ssl false