npm总是报错:unable to verify the first certificate

原创 2017年09月30日 11:06:10
https://blog.csdn.net/nicexibeidage/article/details/78140692?locationNum=2&fps=1

今天npm install总是报错:unable to verify the first certificate(无法验证第一证书),查了一下发现

As of February 27, 2014, npm no longer supports its self-signed certificates.

2014年2月27日,npm不再支持自签名证书。

因为npm install走的是https协议,需要通过数字证书来保证的

解决方法1:

取消ssl验证:npm config set strict-ssl false

如果还没成功,则将npm源更换为国内镜像:
npm config set registry http://registry.cnpmjs.org/
npm config set registry http://registry.npm.taobao.org/

解决方法2:

升级:npm install npm -g --ca=null
或者 npm config set ca=""

推荐使用方法1

npm 报错unable to verify the first certificate的更多相关文章

  1. npm总是报错:unable to verify the first certificate

    今天npm install总是报错:unable to verify the first certificate(无法验证第一证书),查了一下发现 As of February 27, 2014, n ...

  2. 解决npm install过程中报错:unable to verify the first certificate

    今天使用npm安装开发包时遇到“unable to verify the first certificate”(无法验证第一证书)这个问题 原因:2014年2月27日,npm不再支持自签名证书.因为n ...

  3. [RN] React Native 使用 react-navigation 报错 "Unable to resolve module `react-native-gesture-handler`

    在React Native 使用 react-navigation 过程中,报错 "Unable to resolve module `react-native-gesture-handle ...

  4. delphi调试需要管理员权限程序报错“Unable to create process:请求的操作需要提升”

    delphi调试启动需要UAC权限的程序的时候会报错“Unable to create process:请求的操作需要提升”.这是因为delphi没有以管理员身份启动,这样delphi createp ...

  5. AS添加依赖报错Unable to merge dex

    AS添加依赖报错Unable to merge dex 最近在给项目添加依赖的时候,要给项目导入Bmob的SDK,参照Bmob的官方文档,可以直接在app的build.gradle文件中添加 //Bm ...

  6. centos6.5环境wget报错Unable to establish SSL connection

    centos6.5环境wget报错Unable to establish SSL connection [root@centossz008 src]# wget --no-check-certific ...

  7. linux 下通过xhost进入图形界面,经常会出现报错“unable to open display”

    linux 下通过xhost进入图形界面,经常会出现报错“unable to  open display” linux下的操作步骤如下: [root@localhost ~]# vncserver N ...

  8. 安装了nodejs后在命令行运行npm报错

    安装了nodejs后在命令行运行npm报错:Error: Cannot find module 'internal/util/types' 解决方法:删除目录“C:\Users\mengxiaobo\ ...

  9. git clone 报错Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

    在执行git clone命令报错 Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange metho ...

随机推荐

  1. 关于checkbox自动选中

    checkbox是比较常用的,无论是权限管理还是博客的文章的标签类型的勾选,或者是上下级部门及其公司,都会用的到的. 今天主要讲的是checkbox自动根据值选中. 可参考我之前的文章:checkbo ...

  2. windows10 安装 Anaconda 并配置 pytorch1.0

    官网下载Anaconda安装包,按步骤安装即可安装完后,打开DOS,或Anaconda自带的Anaconda Prompt终端查看Anaconda已安装的安装包C:\Users\jiangshan&g ...

  3. Kafka设计解析(二十一)Kafka水位(high watermark)与leader epoch的讨论

    转载自 huxihx,原文链接 Kafka水位(high watermark)与leader epoch的讨论 本文主要讨论0.11版本之前Kafka的副本备份机制的设计问题以及0.11是如何解决的. ...

  4. 备份时如何排除掉默认的 information_schema 和 mysql 库?

    备份时如何排除掉默认的 information_schema 和 mysql 库? mysql -e "show databases;" -uroot -ppassword | g ...

  5. SelectObject函数

    SelectObject 函数功能:该函数选择一对象到指定的设备上下文环境中,该新对象替换先前的同样类型的对象. 函数原型:HGDIOBJ SelectObject(HDC hdc, HGDIOBJ ...

  6. 20155216 Exp2 后门原理与实践

    后门原理与实践 实验内容: 常用后门工具 NC 或 netcat netcat是一个底层工具,进行基本的TCP UDP数据收发.常被与其他工具结合使用,起到后门的作用. Linux: 一般自带netc ...

  7. 《网络对抗》Exp4 恶意代码分析

    20155336<网络对抗>Exp4 恶意代码分析 问题回答 实验后回答问题 (1)如果在工作中怀疑一台主机上有恶意代码,但只是猜想,所有想监控下系统一天天的到底在干些什么.请设计下你想监 ...

  8. Could not obtain transaction-synchronized Session for current thread原因及解决方案

            在开发中,碰到到了Could not obtain transaction-synchronized Session for current thread异常,因此特意记录下. 一.问 ...

  9. vue JointJS 实例demo

    前言 越来越发现,前端深入好难哦!虐成渣渣了. 需求:前端绘制灵活的关系图(此demo还是简单的,我的需求才跨出一小步) 安装 npm install jointjs 容器,工具栏 <templ ...

  10. flask-login 整合 pyjwt + json 简易flask框架

    现在很多框架都实现前后端分离,主要为了适应以下几个目的: 1,前后端的分离,可以使前端开发和后端开发更加分工明确,而不是后端还需要在视图模板中加入很多{% XXXX %}标签 2,是为了适应跨域调用或 ...