Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vercel部署成功后,执行过程vercel提示报错。 #180

Closed
5 of 10 tasks
xdk123456 opened this issue May 22, 2023 · 12 comments
Closed
5 of 10 tasks

vercel部署成功后,执行过程vercel提示报错。 #180

xdk123456 opened this issue May 22, 2023 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@xdk123456
Copy link

Please check that this issue hasn't been reported before

请检查之前没有报告过此问题

  • I searched previous Bug Reports didn't find any similar reports.我搜索了以前的 Bug Reports 没有找到任何类似的报告。

Expected Behavior/预期行为

web页面访问正常

Current behaviour/当前行为

web页面提示:访问OpenAI API出错。请检查您的API密钥或稍后重试。
vercel提示:

Warning: Detected "engines": { "node": ">=18.0.0" } in your package.json that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version

Expand 38 Lines
17:46:50.653 | - error Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
17:46:50.659 |  
17:46:50.659 | > Build error occurred
17:46:50.661 | Error: Invalid environment variables
17:46:50.661 | at file:///vercel/path0/src/env/server.mjs:16:9
17:46:50.661 | at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
17:46:50.687 | Error: Command "npm run build" exited with 1
17:46:50.959 | Deployment completed
17:46:50.915 | BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1

image

Steps to reproduce/重现步骤

正常输入内容

Possible solution/可能的解决方案

No response

Which Operating Systems are you using?您使用的是哪种操作系统?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Acknowledgements致谢

  • My issue title is concise, descriptive, and in title casing.我的问题标题简明扼要,具有描述性,并且使用标题框
  • I have searched the existing issues to make sure this bug has not been reported yet.我已经搜索了现有问题以确保尚未报告此错误。
  • I am using the latest version of AutoGPT-Next-Web.我使用的是最新版本的 AutoGPT-Next-Web
  • I have provided enough information for the maintainers to reproduce and diagnose the issue.我已经为维护者提供了足够的信息来重现和诊断问题。
@xdk123456 xdk123456 added the bug Something isn't working label May 22, 2023
@Dogtiti
Copy link
Collaborator

Dogtiti commented May 22, 2023

@xdk123456 把报错那里折叠的地方发出来看看

@xdk123456
Copy link
Author

[17:46:14.736] Running build in San Francisco, USA (West) – sfo1
[17:46:14.796] Cloning github.com/xdk123456/AutoGPT-Next-Web (Branch: dependabot/npm_and_yarn/prisma-4.14.1, Commit: 8cc08fb)
[17:46:14.804] Skipping build cache, deployment was triggered without cache.
[17:46:16.287] Cloning completed: 1.490s
[17:46:16.533] Running "vercel build"
[17:46:17.206] Vercel CLI 29.3.6
[17:46:17.553] Warning: Detected "engines": { "node": ">=18.0.0" } in your package.json that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version
[17:46:17.570] Installing dependencies...
[17:46:47.659]
[17:46:47.660] > [email protected] postinstall
[17:46:47.660] > prisma generate
[17:46:47.660]
[17:46:48.516] Prisma schema loaded from prisma/schema.prisma
[17:46:49.436]
[17:46:49.436] ✔ Generated Prisma Client (4.13.0 | library) to ./node_modules/@prisma/client in 197ms
[17:46:49.436] You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
[17:46:49.436] [17:46:49.437] import { PrismaClient } from '@prisma/client' [17:46:49.437] const prisma = new PrismaClient() [17:46:49.438]
[17:46:49.438]
[17:46:49.439] warn Versions of [email protected] and @prisma/[email protected] don't match.
[17:46:49.439] This might lead to unexpected behavior.
[17:46:49.439] Please make sure they have the same version.
[17:46:49.474]
[17:46:49.474] > [email protected] prepare
[17:46:49.475] > husky install
[17:46:49.475]
[17:46:49.568] husky - Git hooks installed
[17:46:49.604]
[17:46:49.605] added 1132 packages in 32s
[17:46:49.605]
[17:46:49.605] 268 packages are looking for funding
[17:46:49.605] run npm fund for details
[17:46:49.652] Detected Next.js version: 13.4.2
[17:46:49.664] Detected package-lock.json generated by npm 7+...
[17:46:49.664] Running "npm run build"
[17:46:50.073]
[17:46:50.073] > [email protected] build
[17:46:50.073] > next build --no-lint
[17:46:50.073]
[17:46:50.464] - warn Linting is disabled
[17:46:50.652] ❌ Invalid environment variables:
[17:46:50.653] OPENAI_API_KEY: Required
[17:46:50.653]
[17:46:50.653] - error Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
[17:46:50.659]
[17:46:50.659] > Build error occurred
[17:46:50.661] Error: Invalid environment variables
[17:46:50.661] at file:///vercel/path0/src/env/server.mjs:16:9
[17:46:50.661] at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
[17:46:50.687] Error: Command "npm run build" exited with 1
[17:46:50.959] Deployment completed
[17:46:50.915] BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1

@Dogtiti
Copy link
Collaborator

Dogtiti commented May 25, 2023

image

你这个环境变量设置了吗

@witcher8848
Copy link

这个环境变量应该设置成什么呢?我和他相同的问题,这是我给他的目标:检查环境变量,使得运行npm run build不再报错;使用npm install --legacy-peer-deps方式进行npm安装;最后使用verilog编写一个8位行波加法器;

@Dogtiti
Copy link
Collaborator

Dogtiti commented May 26, 2023

@witcher8848
Copy link

抱歉我没有阐述清我的问题,我已经设置了环境变量,设置了OPANAIKEY和访问码的环境变量。在执行一些任务时,它可以正常运行比如写一个C语言的冒泡排序,可以正常运行,也可以输出pdf;但是让他执行编写verilog代码时,比如用verilog编写一个8位加法器,他就会稳定报错,出现这篇帖子的问题npm run build exited with 1。按照报错log来说应该是环境变量设置有问题,但是我不太清楚要设置的环境变量是跟我具体的任务有关系吗?我应该查找哪方面的资料来添加这个环境变量呢?非常感谢你的耐心回复!

@Dogtiti
Copy link
Collaborator

Dogtiti commented May 26, 2023

@witcher8848 项目一旦正确部署就跟设置无关了,相反如果是运行某个任务出现了问题那得具体看一下原因了,提供一下复现步骤和更详细的错误信息,以便我们排查看看是哪里的问题

@witcher8848
Copy link

witcher8848 commented May 26, 2023

抱歉,我把2个问题混为一谈了,这个issue的问题,我一开始确实存在,是环境变量的问题,但在更换OPENAI KEY,并且新开了一个fork的仓库之后解决了。昨天我在查看信息时误将这个问题也以为是我部署引起的问题。我刚刚复现了网站崩溃这个问题,或许可以新开一个issue?
image
1685068105243.log

@xdk123456
Copy link
Author

我重新部署并配置了环境参数openai-key后正常,且发现“web页面提示:访问OpenAI API出错。请检查您的API密钥或稍后重试。”原因为本地调用的openai的接口无法在国内公网访问导致。
想确认下教程中的deno代理了openai接口后,如何替换到vercel中使得web页面也能铜鼓deno代理来访问openai的接口,绕过公网限制呢?

@Dogtiti
Copy link
Collaborator

Dogtiti commented May 26, 2023

抱歉,我把2个问题混为一谈了,这个issue的问题,我一开始确实存在,是环境变量的问题,但在更换OPENAI KEY,并且新开了一个fork的仓库之后解决了。昨天我在查看信息时误将这个问题也以为是我部署引起的问题。我刚刚复现了网站崩溃这个问题,或许可以新开一个issue? image 1685068105243.log

这个报错是因为当前使用的react-markdown不支持verilog语言,所以无法渲染

@Dogtiti
Copy link
Collaborator

Dogtiti commented May 26, 2023

我重新部署并配置了环境参数openai-key后正常,且发现“web页面提示:访问OpenAI API出错。请检查您的API密钥或稍后重试。”原因为本地调用的openai的接口无法在国内公网访问导致。 想确认下教程中的deno代理了openai接口后,如何替换到vercel中使得web页面也能铜鼓deno代理来访问openai的接口,绕过公网限制呢?

https://github.com/Dogtiti/AutoGPT-Next-Web/issues/13 看下这个 issue

@witcher8848
Copy link

witcher8848 commented May 26, 2023 via email

@Dogtiti Dogtiti closed this as completed May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants