Closed dobromyslov closed 3 years ago
Added new issue to the HttpsProxyAgent https://github.com/TooTallNate/node-agent-base/issues/48 HttpsProxyAgent should update agent-base package after it's fixed.
Workaround:
import { Agent } from 'https';
const agent = new HttpsProxyAgent(this.proxyUrl) as unknown as Agent;
Type 'HttpsProxyAgent' is not assignable to type 'Agent | ((parsedUrl: URL) => Agent)'. Property 'maxTotalSockets' is missing in type 'HttpsProxyAgent' but required in type 'Agent'.
http.Agent
class with mandatorymaxTotalSockets
property.Therefore it's impossible to assign HttpsProxyAgent to the node-fetch's agent.