[英]Nodejs deepstream connection failure
I am currently following some NodeJS & Deepstream.io.client-js tutorials.我目前正在关注一些 NodeJS 和 Deepstream.io.client-js 教程。 But an error occurs while trying to login to the server.
但是尝试登录服务器时发生错误。 I have no idea what that error means but here it is!
我不知道那个错误是什么意思,但它来了!
const express = require('express'),
bodyParser = require('body-parser'),
ds = require('deepstream.io-client-js'),
app = express();
// Create deepstream client
const client = ds('wss://154.deepstreamhub.com?apiKey=xxx');
client.login();
The error I get :我得到的错误:
Error: connectionError: Error: self signed certificate in certificate chain (C)
at Client._$onError (C:\Users\xdidemk\Desktop\nodejs\node_modules\deepstream.io-client-js\dist\lib\client.js:204:11)
at Timeout._onTimeout (C:\Users\xdidemk\Desktop\nodejs\node_modules\deepstream.io-client-js\dist\lib\message\connect
ion.js:315:19)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
你试过添加这个吗?
process.env.NODE_TLS_REJECT_UNAUTHORIZED='0'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.