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

新特性请求:支持Cloudflare一键部署 #239

Closed
latorc opened this issue Mar 30, 2023 · 6 comments
Closed

新特性请求:支持Cloudflare一键部署 #239

latorc opened this issue Mar 30, 2023 · 6 comments
Labels
help wanted Extra attention is needed invalid This doesn't seem right

Comments

@latorc
Copy link
Contributor

latorc commented Mar 30, 2023

作为前端小白,希望能在cloudflare pages部署这个项目。似乎需要把vercel的serverless function改成Cloudflare版本的function,是否有方法可以判断平台?

@Yidadaa Yidadaa added the help wanted Extra attention is needed label Mar 30, 2023
@AprilNEA
Copy link
Contributor

AprilNEA commented Mar 30, 2023

首先判断平台是可以的,Edge Runtime 改成 Cloudflare Function 也没有多少工作量。
但是目前 Cloudflare Pages 还不支持 Next.js13 的实验性功能也就是本项目使用的appDir,故本特性不太可能在短期内被支持。

可以尝试: https://github.com/cloudflare/next-on-pages

@latorc
Copy link
Contributor Author

latorc commented Apr 2, 2023

首先判断平台是可以的,Edge Runtime 改成 Cloudflare Function 也没有多少工作量。 但是目前 Cloudflare Pages 还不支持 Next.js13 的实验性功能也就是本项目使用的appDir,故本特性不太可能在短期内被支持。

可以尝试: https://github.com/cloudflare/next-on-pages
试了在CF选择next.js编译,有错误说:

02:18:01.989 ⚡️ Completed 'npx vercel build'.
02:18:01.989 ⚡️
02:18:02.622 ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
02:18:02.622 ⚡️ The following functions were not configured to run with the Edge Runtime:
02:18:02.622 ⚡️
02:18:02.622 ⚡️ - index
02:18:02.622 ⚡️ - index.rsc

不知道怎么解决 = =;

index和index.rsc不知道是什么

@latorc
Copy link
Contributor Author

latorc commented Apr 2, 2023

image
CF的编译设置
NODE_VERSION 是16 似乎CF不支持18

@Yidadaa
Copy link
Collaborator

Yidadaa commented Apr 5, 2023

cf 貌似尚未支持 nextjs13,可能需要降级一下 nextjs 版本

@AprilNEA
Copy link
Contributor

AprilNEA commented Apr 5, 2023

image CF的编译设置 NODE_VERSION 是16 似乎CF不支持18

目前手动指定 NODE_VERSION 最高仅能支持到 17

@darth-pika-hu
Copy link
Contributor

darth-pika-hu commented May 9, 2023

@latorc @AprilNEA @Yidadaa 要在Environment variables里,设置NODE_VERSION为18,你设20.1都行。具体看 #982#1368

ryiann pushed a commit to ryiann/ChatGPT that referenced this issue Feb 19, 2024
- [+] feat(constant.ts): add new model 'gpt-3.5-turbo-0125' to DEFAULT_MODELS array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants