cometd / cometd-nodejs-client

CometD client for NodeJS
Apache License 2.0
17 stars 7 forks source link

TypeError: HttpsProxyAgent is not a constructor #29

Closed nicob-29 closed 10 months ago

nicob-29 commented 10 months ago

Hi version 1.3.0 If a proxy is defined and includes contains HTTPS url. Handshake failed because it is not possible to instantiate HttpsProxyAgent.

If I replace return _secure(serverURI) ? new HttpsProxyAgent(agentOpts) : new HttpcProxyAgent(agentOpts); by return _secure(serverURI) ? new HttpsProxyAgent.HttpsProxyAgent(agentOpts) : new HttpcProxyAgent(agentOpts); No exception is raised

image Image shows the current implmentation doesn't consider new HttpsProxyAgent(agentOpts) has constructor

sbordet commented 10 months ago

Thanks for reporting this, a fix in underway.