解决执行npm(或pnpm)时报:证书过期 certificate has expired问题

项目执行 pnpm install 初始化时报 reason: certificate has expired 错误。

解决方案

1、取消ssl验证:

npm config set strict-ssl false

这个方法一般就可以解决了。


2、更换npm镜像源:

npm config set registry http://registry.cnpmjs.org
npm config set registry http://registry.npm.taobao.org

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-23 08:48:01       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-23 08:48:01       106 阅读
  3. 在Django里面运行非项目文件

    2024-01-23 08:48:01       87 阅读
  4. Python语言-面向对象

    2024-01-23 08:48:01       96 阅读

热门阅读

  1. npm换源

    2024-01-23 08:48:01       52 阅读
  2. 【issue-halcon例程学习】fuzzy_measure_pin.hdev

    2024-01-23 08:48:01       50 阅读
  3. 【issue-halcon例程学习】measure_arc.hdev

    2024-01-23 08:48:01       48 阅读
  4. 流畅的Python(五)- 一等函数

    2024-01-23 08:48:01       46 阅读
  5. 使用flask_limiter限制接口访问速率的方法

    2024-01-23 08:48:01       55 阅读
  6. AcWing 1229.日期问题(枚举题,细节多)

    2024-01-23 08:48:01       54 阅读
  7. c# OpenTK 入门

    2024-01-23 08:48:01       53 阅读
  8. gin框架复习

    2024-01-23 08:48:01       55 阅读
  9. Elasticsearch 查询超过10000 的解决方案 - Python

    2024-01-23 08:48:01       63 阅读
  10. vue v-for 为什么要加 key

    2024-01-23 08:48:01       44 阅读