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

[Question] deploy on cloudflare #715

Closed
Feliks151450 opened this issue Dec 19, 2023 · 15 comments
Closed

[Question] deploy on cloudflare #715

Feliks151450 opened this issue Dec 19, 2023 · 15 comments
Labels
😇 Help Wanted Need help | 需要帮助 Inactive No response in 30 days | 超过 30 天未活跃

Comments

@Feliks151450
Copy link

🧐 问题描述 | Proposed Solution

It is possible to depoly on cloudflare pares?

📝 补充信息 | Additional Information

No response

@Feliks151450 Feliks151450 added the 😇 Help Wanted Need help | 需要帮助 label Dec 19, 2023
@lobehubbot
Copy link
Member

👀 @Feliks151450

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@suwubee
Copy link

suwubee commented Dec 21, 2023

确实不支持,改了半天。到最后剩下
export const runtime = 'edge';
提示太多文件,改不下去了

https://github.com/suwubee/lobe-chat/tree/main

@arvinxx
Copy link
Contributor

arvinxx commented Dec 21, 2023

@suwubee 能否分享一下兼容 cloudflare 部署需要做哪些改造?

我对 cloudflare 不太熟悉

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@suwubee Can you share what modifications are needed for compatible deployment?

@suwubee
Copy link

suwubee commented Dec 21, 2023

@suwubee 能否分享一下兼容 cloudflare 部署需要做哪些改造?

我对 cloudflare 不太熟悉

我fork里主要是改了package.json和vercel.json,
变量是设置nodejs和yarn的版本。
但最后还是一堆edge的问题,现在的代码感觉就是为了vercel写的,比如那个vercel分析,默认开启,不太清楚有多少人需要,而且不通用。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@suwubee Can you share what modifications are needed to be compatible with cloudflare deployment?

I'm not familiar with cloudflare

In my fork, I mainly changed package.json and vercel.json.
The variable is to set the version of nodejs and yarn.
But in the end there are still a lot of edge problems. The current code feels like it was written for vercel. For example, the vercel analysis is turned on by default. It is not clear how many people need it, and it is not universal.

@suwubee
Copy link

suwubee commented Dec 21, 2023

`
Build command:
npx @cloudflare/[email protected]

Variable name Value
NEXT_PUBLIC_ANALYTICS_VERCEL 0
NEXT_PUBLIC_VERCEL_DEBUG 0
NODE_VERSION 20.10.0
YARN_VERSION 1.22.19
`
Settings - Functions - Compatibility flags
Compatibility flags:
nodejs_compat

上述配置是参考了next web的

@ckt1031
Copy link

ckt1031 commented Jan 7, 2024

@suwubee 能否分享一下兼容 cloudflare 部署需要做哪些改造?

我对 cloudflare 不太熟悉

所有頁面必須以edge模式運行,目前遇到的react i18n 文件的問題

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@suwubee Can you share what modifications are needed to be compatible with cloudflare deployment?

I'm not very familiar with cloudflare

All pages must run in edge mode. Currently, there are problems with react i18n files.

@lobehubbot lobehubbot added the Inactive No response in 30 days | 超过 30 天未活跃 label Feb 7, 2024
@a562314
Copy link

a562314 commented May 30, 2024

@suwubee 能否分享一下兼容 cloudflare 部署需要做哪些改造?

我对 cloudflare 不太熟悉

I'm getting a lot of errors when deploying on Cloudflare
When to support lobechat deployment on Cloudflare pages?

@arvinxx
Copy link
Contributor

arvinxx commented May 31, 2024

@a562314 currently there is no plan about it.

@fjqz177
Copy link

fjqz177 commented Jun 12, 2024

When can I deploy lobechat on cloudflare pages? Because the pages deployed on cloudflare pages are faster to access.
请问什么时候能在cloudflare pages上部署lobechat啊?因为cloudflare pages部署的页面访问比较快(主要还是因为vercel被墙了)

@sxjeru
Copy link
Contributor

sxjeru commented Jun 21, 2024

@fjqz177 Cloudflare 免费计划对构建后的单文件大小限制在 25MB,lobechat 太大了。

如果你开通了付费,可以试试去部署,部署前记得删去根目录的 .nvmrc 文件。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@fjqz177 Cloudflare free plan limits single file size after build to 25MB, lobechat is too big.

If you have paid, you can try to deploy. Remember to delete the .nvmrc file in the root directory before deploying.

@arvinxx arvinxx closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2024
@lobehubbot
Copy link
Member

@Feliks151450

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😇 Help Wanted Need help | 需要帮助 Inactive No response in 30 days | 超过 30 天未活跃
Projects
None yet
Development

No branches or pull requests

8 participants