Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

NextJS Routing

I'm having trouble with my site accessing certain routes. Locally everything works as expected but once deployed it stops working. Example of a working route: https://c4306de2.scardoc-website.pages.dev/docs ...

Is it possible to upload files via the API?

I would like to deploy a site (let's say consisting of an index.html and a style.css file) to cloudflare pages. Is it possible to do this via the API? I couldn't find anything in the docs. Thanks!

Github Automatic Deployments not working right now?

I pushed a commit to github 17 minutes ago, and I don't see it under deployments. I just pushed another test commit and I don't see that one either.

Setting Up Custom Domains for Different Branches in Cloudflare Pages

I'm currently utilizing Cloudflare Pages and have successfully integrated my project directly with GitHub. Within my repository, I manage two primary branches: 'main' for production and 'stage' for testing purposes. For my production environment, I've successfully configured a custom domain, specifically www.mywebsite.com, and everything is functioning as expected. However, I'm encountering challenges when attempting to establish a custom domain for the 'stage' branch. Ideally, I'd like to have a domain like stage.mywebsite.com for this testing environment. My question is: How can I go about specifying a custom domain for the 'stage' branch in Cloudflare Pages? I've reviewed the documentation and guides, but I haven't found a clear solution for achieving this configuration. Is it even possible to have distinct domains for each branch, such as having different domains for production and testing environments?...
No description

Nuxt3 page local development issue

I am developing a nuxt3 app. I deploy it using pages. It works fine on cloud, but I want to develope some functionalities locally. I have an endpoint like this: ``` import { D1Database } from "@cloudflare/workers-types"; export default defineEventHandler(async ({ context }) => {...

can i schedule recurring re-deployments / re-builds?

I'm using Hugo > GitHub > CF Pages. One of the great features about Hugo is the ability to set up and QC posts for the future. In order for these future posts to be visible, it looks like I need to re-deploy the CF Page after the date of the blog post. I confirmed this manually - these two builds run from the same commit, but the second one shows the additional blog post with the publish date set to be a time in between the two builds. There must be a way to re-deploy on a specific schedule. (CF Pages Cron job.) I would appreciate your advice!...
No description

flutter web suppprt

Please add flutter web build support, I'm looking to deploy my app and every time I have to build locally before I push in order to get cloudflare to use the dist. Please add flutter cli support...

How can I run static + dynamic site under same domain?

I am trying/figuring out, how to run a static site (SSG) + dynamic app (using Next.js SSR) serve pages under same domain. For example Static site...

langchain's openai model fails on pages

I'm getting this error: Error: Failed to publish your Function. Got error: Uncaught Error: [unenv] crypto.getHashes is not implemented yet! From doing this:...

Deploy multiples sites from one repo

I want to deploy multiple website [domain pages.dev] from a single Github repo, but using different content based on environment settings. Currently this is not possible, CF Pages only allows one site per repo.

SvelteKit Getting 503 Errors When Posting to Form Action

When I try and login on my sveltekit app, I occasionally get a 503 error when posting to the form action. It's quite annoying and limiting me from going to production. https://github.com/torbet/pintfind https://pintfind.com...

How do I publish from Wordpress to GitHub without using/paying $$$ for the Simply Static plug-in?

So the goal is to have ‘one click publishing’ from a Wordpress site through to a GitHub repo, which would then be picked up by pages. I’m aware the Simply Static plug-in does this, it has a ‘deploy to git’ feature. However it’s US$99/yr/per site, or US$499/yr for unlimited sites. I have about 5. Surely there’s a cheaper way? ...

Most effective method for clearing the R2 object cache after updating from Pages Function?

Hello, I am using Cloudflare Pages, and I have connected R2 using Pages Function. Could you please help me purge the R2 object cache after updating the file from the Pages Function? Thanks!...

vercel/og missing .wasm files

When using the vercel/og pages plugin I get this error: ``` ✘ [ERROR] 2 error(s) and 0 warning(s) when compiling Worker. 20:36:18.056
20:36:18.056 ...

non CSS MIME type distribution of CSS files

Chrome: Refused to apply style from 'https://lifechurch.j-m.zip/css/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. Firefox: Did not parse stylesheet at 'https://lifechurch.j-m.zip/css/style.css' because non CSS MIME types are not allowed in strict mode. These are the errors that I receive from my CSS files. I am using Hugo to build the project. I have seen some posts that refer to using a worker/pages function to actually change the header, but this seems unreasonable as I shouldn't have to risk extra costs if I somehow managed to reach the functions limits. I don't think this is the desired results that Cloudflare is trying to acheive. ...
No description

Custom font for vercel/og plugin

I'm trying to port a api route from NextJS on Vercel to a function on pages and it uses custom fonts with vercel/og. Will the same code that works in Next work on a function? ```ts const jakartaExtraBoldFont = fetch(new URL('../../../public/fonts/embed/PlusJakartaSans-ExtraBold.ttf', import.meta.url)).then((res) => res.arrayBuffer()...

Use Custom Hostnames to point to Cloudflare Pages project

Hi, I want to set up Custom Hostnames to point to my Cloudflare Pages project, but this doesn't appear to be possible. Let me elaborate: Currently I host a project at a different provider, and I use the Custom Hostnames feature in the zone (SSL/TLS > Custom Hostnames) to allow customers to have their own domain for their tenant in my SaaS....
No description

Segmentation fault while adding dynamic routes in next js

deployment ID: 3a2e0d9f-f159-49c3-a519-8e4d582e08e8 account ID: d5b5751efdc386eae183fed7730f526f Hi, I am trying to deploy my next.js app on pages. But it shows Segmentation fault when trying to deploy with multiple paths under a dynamic route. This error goes away if I keep maximum of 1 path under dynamic route....

@sveltejs/adapter-cloudflare problem in a monorepo

I have a local workspace package that I import into my sveltekit project. Lets say this package has kysely and @libsql/kysely as its dependencies. Consuming this package results in a build failure like this: ``` Could not resolve "node:stream" ...

Something is caching my Pages site

Hello, I have an issue where pages seem to be cached for some reason. I believe I have turned off Cloudflare's caching in the dashboard (see image). However, old pages are sometimes served. I have a server-side rendered page with a countdown on it. Often, what will happen is that a user will load the page, then close it, then come back to it later, and it displays the (now outdated) same server-side rendered countdown as it did the first time they visited (until JS loads and executes)....
No description