在过去的日子里我有过这样的事情..。
const HttpsProxyAgent = require("https-proxy-agent");
new HttpsProxyAgent(URL)但是当我皈依ESM时..。
import HttpsProxyAgent from "https-proxy-agent";
// Also tried
// import * as HttpsProxyAgent from "https-proxy-agent";
new HttpsProxyAgent(URL)我得到..。
(节点:7856) UnhandledPromiseRejectionWarning: TypeError: HttpsProxyAgent不是构造函数
那么我现在该怎么做呢?是否有节点支持的本地ES6代理?
发布于 2022-02-04 11:50:28
这样做是可行的:
import { HttpsProxyAgent } from 'https-proxy-agent';https://stackoverflow.com/questions/53419610
复制相似问题