Open aiiibolo opened 2 hours ago
👀 @aiiibolo
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
Hey there, @aiiibolo! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!
To resolve the "Invalid environment variables: { S3_PUBLIC_DOMAIN: [ 'Invalid url' ] }" error when deploying a database version locally on Vercel with Next.js and tRPC, ensure that the S3_PUBLIC_DOMAIN
environment variable is set to a valid URL. The URL must start with https://
to be considered valid.
Here is an example of how to set the S3_PUBLIC_DOMAIN
environment variable correctly:
S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
Make sure to replace https://s3-for-lobechat.your-domain.com
with your actual S3 public domain URL. The https://
prefix is essential for the URL to be valid.
Additionally, note that NEXT_PUBLIC_S3_DOMAIN
is deprecated and should be replaced with S3_PUBLIC_DOMAIN
in your environment configuration. The src/config/file.ts
file indicates that S3_PUBLIC_DOMAIN
is the preferred variable:
const S3_PUBLIC_DOMAIN = process.env.S3_PUBLIC_DOMAIN || process.env.NEXT_PUBLIC_S3_DOMAIN;
if (!!process.env.NEXT_PUBLIC_S3_DOMAIN) {
console.warn(
'⚠️ `NEXT_PUBLIC_S3_DOMAIN` will be deprecated in the next major version, please replace it with `S3_PUBLIC_DOMAIN` in your env',
);
}
Ensure that your environment variables are updated accordingly to avoid future issues [1][2].
Additionally, there are similar discussions that might be helpful:
To continue talking to Dosu, mention @dosu.
I found a similar discussion that might be relevant to your issue: Vercel部署报错出现这种状况改如何解决 [1].
To resolve the "Invalid environment variables: { S3_PUBLIC_DOMAIN: [ 'Invalid url' ] }" error, ensure that the S3_PUBLIC_DOMAIN
environment variable is a valid URL. The URL must start with https://
.
Here is an example of how to set the S3_PUBLIC_DOMAIN
environment variable correctly:
S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
Make sure to replace https://s3-for-lobechat.your-domain.com
with your actual S3 public domain URL [2].
Additionally, there is a known issue related to version v1.19.25 of lobe-chat that could affect deployment. The issue is related to missing translations, which has been addressed in a recent bug fix [3].
If you continue to experience issues, please double-check your DNS records and ensure they are correctly configured.
To continue talking to Dosu, mention @dosu.
📦 Environment
Vercel
📌 Version
v1.19.25
💻 Operating System
macOS
🌐 Browser
Other
🐛 Bug Description
本地部署数据库版本是部署失败 提示环境变量有错误 我检查了多次没有发现问题在哪。 以下是相关截图附件
📷 Recurrence Steps
No response
🚦 Expected Behavior
No response
📝 Additional Information
No response