node-fetch: Property 'freeSockets' is missing in type 'HttpsProxyAgent' but required in type 'Agent'.
Closed this issue · 5 comments
rbellamy commented
plugins/slack/src/index.ts:178:7 - error TS2322: Type 'HttpsProxyAgent | undefined' is not assignable to type 'Agent | ((parsedUrl: URL) => Agent) | undefined'.
Type 'HttpsProxyAgent' is not assignable to type 'Agent | ((parsedUrl: URL) => Agent) | undefined'.
Property 'freeSockets' is missing in type 'HttpsProxyAgent' but required in type 'Agent'.
178 agent: proxyUrl ? createHttpsProxyAgent(proxyUrl) : undefined,
~~~~~
node_modules/@types/node/http.d.ts:362:18
362 readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
~~~~~~~~~~~
'freeSockets' is declared here.
hipstersmoothie commented
This issue is blocking the merge of intuit/auto#1317
baba43 commented
Any workaround for now?
AndrewO commented
I had this as well. The solution was to downgrade @types/node
to a 12.x.y version.
nickelswitte commented
Workaround would be to pass the agent as any
TooTallNate commented
agent-base
now extends directly from Node's http.Agent
, so this should be fixed as of the latest release.