ikechan8370 / chatgpt-plugin

云崽系机器人的智能聊天插件
https://www.yunzai.chat/
GNU General Public License v3.0
998 stars 104 forks source link

Class constructor HttpsProxyAgent cannot be invoked without 'new' #534

Closed TaoXiaoBai closed 1 year ago

TaoXiaoBai commented 1 year ago
[YzBot][17:53:08.419][ERRO] TypeError: Class constructor HttpsProxyAgent cannot be invoked without 'new'
    at SydneyAIClient.createNewConversation (file:///I:/Yunzai-Bot/plugins/chatgpt-plugin/utils/SydneyAIClient.js:97:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SydneyAIClient.sendMessage (file:///I:/Yunzai-Bot/plugins/chatgpt-plugin/utils/SydneyAIClient.js:230:45)
    at async chatgpt.sendMessage (file:///I:/Yunzai-Bot/plugins/chatgpt-plugin/apps/chat.js:1625:24)
    at async chatgpt.abstractChat (file:///I:/Yunzai-Bot/plugins/chatgpt-plugin/apps/chat.js:1035:25)
    at async chatgpt (file:///I:/Yunzai-Bot/plugins/chatgpt-plugin/apps/chat.js:815:5)
    at async PluginsLoader.deal (file:///I:/Yunzai-Bot/lib/plugins/loader.js:274:52)

https-proxy-agent 为5.0.1。 已尝试pnpm install https-proxy-agent@5.0.1 -w。没有用

ikechan8370 commented 1 year ago

该错误会出现在7.x的https-proxy-agent上,已修复。 至于你说你看的版本为5.x,应该是同时也安装了7的,不然不会出现这个错。 最新的提交修复了对7.x的支持,可以试试

TaoXiaoBai commented 1 year ago

更新插件以后可以了,感谢