Closed latorc closed 1 year ago
首先判断平台是可以的,Edge Runtime 改成 Cloudflare Function 也没有多少工作量。
~但是目前 Cloudflare Pages 还不支持 Next.js13 的实验性功能也就是本项目使用的appDir
,故本特性不太可能在短期内被支持。~
首先判断平台是可以的,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不知道是什么
CF的编译设置 NODE_VERSION 是16 似乎CF不支持18
cf 貌似尚未支持 nextjs13,可能需要降级一下 nextjs 版本
CF的编译设置 NODE_VERSION 是16 似乎CF不支持18
目前手动指定 NODE_VERSION 最高仅能支持到 17
@latorc @AprilNEA @Yidadaa 要在Environment variables里,设置NODE_VERSION为18,你设20.1都行。具体看 #982 和 #1368 。
作为前端小白,希望能在cloudflare pages部署这个项目。似乎需要把vercel的serverless function改成Cloudflare版本的function,是否有方法可以判断平台?