美文网首页
启动项目报错npm ERR!request to https:/

启动项目报错npm ERR!request to https:/

作者: c6e71129966d | 来源:发表于2024-03-04 14:27 被阅读0次

npm 安装插件报错如下:
npm ERR!request to https://registry.npm.taobao.org/...reason:certificate has expired

问题浮现原因:
原来设置淘宝镜像,官方已经修改了地址,导致不管下载什么组件都会报错

解决步骤1:将npm的下载源恢复成默认的官方源
npm config set registry https://registry.npmjs.org

解决步骤2:最新的配置淘宝镜像的淘宝官方提供的方法:
npm config set registry https://registry.npmmirror.com

解决步骤3:查看是否修改成功
npm config get registry

完成!

如果执行npm install 还是报错

执行以下命令:
清空缓存:
npm cache clean --force

禁止SSL/TLS安全连接
npm config set strict-ssl false

相关文章

网友评论

      本文标题:启动项目报错npm ERR!request to https:/

      本文链接:https://www.haomeiwen.com/subject/vvxrzdtx.html