这个错误表示NPM在尝试通过HTTPS连接到一个资源时,遇到了一个证书过期的问题。NPM需要使用有效的SSL证书来保证通信安全,如果证书过期,NPM将无法建立安全连接。
解决方法:
查看下载源:
npm get registry
#或
npm config get registry
发现之前配置了下载镜像源为https开头的
先执行命令清除npm缓存
npm cache clean --force
再执行命令取消ssl验证
npm config set strict-ssl false
再次执行npm install ***,就可以了
到这就已经可成功install了。
如果还不行,就把npm镜像源为http开头的,不使用https
npm config set registry http://registry.npm.taobao.org