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. nano,pico文本编辑器,debian执行crontab -e

    debian执行crontab -e的时候出现: Edit this file to introduce tasks to be run by cron.## Each task to run has ...

  2. kubernetes 的wen pod 无法连接 mysql 的pod

    1.分析 查看源代码 既然无法建立连接,那先看下是如何建立连接的.登录到myweb的docker容器里面,查看index.jsp文件,主要内容如下: Class.forName("com.m ...

  3. opencv---JPEG图像质量检测代码

    参考:http://blog.csdn.net/trent1985/article/details/50904173 根据国外一篇大牛的文章:No-Reference Perceptual Quali ...

  4. HUE的安装

    HUE: Hadoop User Experience 官网地址:http://gethue.com/ Hue官网无法下载,超时. 使用CDH版本安装. 下载地址: http://archive.cl ...

  5. 20155217《网络对抗》Exp05 MSF基础应用

    20155217<网络对抗>Exp05 MSF基础应用 实践内容 本实践目标是掌握metasploit的基本应用方式,重点常用的三种攻击方式的思路.具体需要完成: 一个主动攻击实践,如ms ...

  6. 20155220 Exp9 Web安全基础实践

    Exp9 Web安全基础实践 实验过程 开启webgoat 输入java -jar webgoat-container-7.1-exec.jar,来运行webgoat 在浏览器输入localhost: ...

  7. 20155321 《网络攻防》 Exp1 PC平台逆向破解(5)M

    20155321 <网络攻防> Exp1 PC平台逆向破解(5)M 实践目标 本次实践的对象是linux的可执行文件 该程序正常执行流程是:main调用foo函数,foo函数会简单回显任何 ...

  8. 利用OVS+FLOODLIGHT,为数据表添加VLAN_ID和MPLS

    话不多说,直接上拓扑: 我这里是用主机h1 (10.0.0.1)ping 主机h2(10.0.0.2) 1.添加VLAN标签 v1: sudo ovs-ofctl add-flow m1-s1 in_ ...

  9. spring使用 RestTemplate 来进行http访问

    https://www.jianshu.com/p/2b03a812d588 https://my.oschina.net/sdlvzg/blog/1800395 异常:org.springframe ...

  10. PowerBI开发 第十四篇:使用M公式添加列

    PowerBI的查询编辑器使用Power Query M公式语言来定义查询模型,它是一种富有表现力的数据糅合(Mashup)语言,一个M查询可以计算(Evalute)一个表达式,得到一个值. 对于开发 ...