[Bug] [OpenAI] [TypeError: fetch failed] { cause: [Error: AggregateError] }

[Bug] [OpenAI] [TypeError: fetch failed] { cause: [Error: AggregateError] }

ubuntu20 win10 edge浏览器访问 服务器部署

页面打开后想使用chatgpt报错了

root@coal-pasi1cmp:/www/wwwroot/ChatGPT-Next-Web# PORT=3000 yarn start

yarn run v1.22.19

warning package.json: License should be a valid SPDX license expression

一、具体解决方案

1、原因

nodejs的版本过高,当前安装的openai是旧版,把其改为18即可。

2、具体步骤

将nodejs改为18

在这里我们用nvm工具进行管理nodejs变量(毕竟以后可能又有项目需要用到20)

(1)nvm安装

参考博客:https://blog.csdn.net/qq_51116518/article/details/135899070?spm=1001.2014.3001.5502

(2)node安装

bash 复制代码
nvm install 18.18.0

(3)node版本切换为18

bash 复制代码
nvm use  18.18.0

(4)查看node版本是否切换完成

bash 复制代码
node -v

如果打印是v18.18.0,即切换完毕

二、运行结果


运行结果无误,问题解决,

相关推荐
@Aurora.6 小时前
【测试】BUG
bug
%d%d23 天前
undefined reference to CPUAllocatorSingleton::instance
bug
gxn_mmf4 天前
典籍知识问答重新生成和消息修改Bug修改
前端·bug
千里马学框架5 天前
重学安卓14/15自由窗口freeform企业实战bug-学员作业
android·framework·bug·systrace·安卓framework开发·安卓窗口系统·自由窗口
Bear on Toilet6 天前
Bug日记——实现“日期类”
开发语言·c++·bug
Direction_Wind6 天前
flinksql bug : Max aggregate function does not support type: CHAR
bug
mg6687 天前
Python Bug 修复案例分析:多线程数据竞争引发的bug 两种修复方法
bug
黎猫大侠8 天前
一次Android Fragment内存泄露的bug解决记录|Fragment not attach to an Activity
android·bug
七七小报8 天前
uniapp-商城-48-后台 分类数据添加修改弹窗bug
uni-app·bug
windwind20008 天前
发行基础:本地化BUG导致审核失败
游戏·青少年编程·编辑器·bug·创业创新·玩游戏