node-ssllabs breaks node-fetch
Opened this issue · 1 comments
rafipiccolo commented
This code breaks. only when i import node-ssllabs. when i comment it out it works.
import ssllabs from 'node-ssllabs'; // try commenting this line to make the code work
import fetch from 'node-fetch';
const res = await fetch('https://httpbin.org/get');
const json = await res.json();
console.log(json);
error stack:
node:internal/errors:484
ErrorCaptureStackTrace(err);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received an instance of Object
at checkListener (node:events:266:3)
at ClientRequest.once (node:events:647:3)
at new ClientRequest (node:_http_client:237:10)
at Object.request (node:https:360:10)
at Object.<anonymous> (/root/docker/check/node_modules/agent-base/patch-core.js:25:22)
at /root/docker/check/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js:23:20
at file:///root/docker/check/node_modules/node-fetch/src/index.js:94:20
at new Promise (<anonymous>)
at fetch (file:///root/docker/check/node_modules/node-fetch/src/index.js:49:9)
at file:///root/docker/check/tryrequest.js:4:19 {
code: 'ERR_INVALID_ARG_TYPE'
}
Node.js v18.10.0
seems related to this : #5
keithws commented
Interesting...
Thank you for reporting and providing a code sample. I am busy today and tomorrow. I will look at this next week.