element-ui,npm ERR! code CERT_HAS_EXPIRED npm ERR! errno CERT_HAS_EXPIRED npm ERR! request to http

这个一般是镜像问题

卸载: npm uninstall element-ui

镜像地址问题:

原来的 registry.npm.taobao.org 已替换为 registry.npmmirror.com

npm config set registry https://registry.npmmirror.com

确认配置已生效,可以使用以下命令查看当前 registry 的配置:如果输出结果为 https://registry.npmmirror.com,说明配置已成功生效。

npm config get registry

如果需要恢复默认的官方源,可以执行以下命令:

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

重新安装。

npm i element-ui -S

猜你喜欢

转载自blog.csdn.net/chenyu_Yang/article/details/140906307