Open k2m5t2 opened 11 months ago
@k2m5t2 I haven't tried edge runtime in cloudflare but was able to deploy the blog as static export, basically you need to add the export option in build "build": "next build && next export"
& choose Framework Preset as Next.js(Static HTML Exports) while deploying to cloudflare
If you are interested please check out my post , its a blog post about deploying morethan-log to cloudflare 😁
But remember the above deployment method is static meaning it wont change with the changes in notion database for each change you would need to rebuild from cloudflare ☹
I would appreciate it if you could add Cloudflare Pages as a deployment option, as it has a much faster cold-start time compared to Vercel (which seems to require users to wait for 10-20 seconds before loading up completely).
Some experiments with Cloudflare Pages cause the following errors that I wasn't able to solve. It seems to be an issue with certain Next.js functions (like dns, os, stream, zlib) being unavailable in Cloudflare's edge runtime. Likely, it must be configured to use Workers instead. Here is the build log:
I am completely new to Next.js and Cloudflare Workers, and have been stuck with this error for a while; I would really appreciate any tips or guidance. Thanks!