node-chatgpt-api
node-chatgpt-api copied to clipboard
Agent error
TypeError: HttpsProxyAgent is not a constructor
at file:///C:/Users/Administrator/Desktop/node-chatgpt-api/src/BingAIClient.js:96:25
at new Promise (
I tried this, it works https://stackoverflow.com/questions/53419610/how-do-i-use-a-proxy-with-node-and-esm
I can give you a chinese answer。 我遇到了同样的错误,确认是 https-proxy-agent升级后的不兼容问题,你可以删掉重新安装老版本试一下,我的已经回复正常了
Same,You can fix it Just like @andrewson253 say.
Open ./src/BingAIClient.js
At the 6 line
import HttpsProxyAgent from 'https-proxy-agent';
change it to
import {HttpsProxyAgent} from 'https-proxy-agent';
And it's fixed.