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

Worker + Assets vs Pages + Worker?

I managed to deploy a full stack app with a D1 database on Workers with static assets but also on Pages with workers. It’s basically the same thing but not really. I’m not sure which option is best. I like that Pages have multiple environments which doesn’t seem to be the case with Workers. Am I missing anything from Workers if I deploy a pages app with workers?...

How do you properly deploy a Next.js app with dynamic routes to Cloudflare Pages?

I’m using Next.js 15 with the new app/directory and trying to deploy my project to Cloudflare Pages using @/cloudflare/next-on-pages. It's a pretty simple project not much going on (repo link below). I've got cloudflare pages connected to the repo an I selected the basic Next.js Framework preset for the build configuration. The build command is: npx @/cloudflare/next-on-pages@1...

Running SvelteKit in Cloudflare

I am moving my SvelteKit from Vercel Edge, which from my understanding is Cloudflare, to Cloudflare directly. However, I get this message when I run a form action: ``bash Error: Can only read the current request event inside functions invoked during handle, such as server load functions, actions, endpoints, and other server hooks. In environments without AsyncLocalStorage, the event must be read synchronously, not after an await`."...
No description

cors setting for cf pages to allow al

"I have a Cloudflare domain with a CF Pages frontend that connects to my backend via a Cloudflare tunnel. However, my CORS is reject all by one origin which is a subdomain I've tried the following without success: - No Pages rules or transform rules are active - Purged cache completely...

Site deployed on Cloudflare is slower and sends more resources than the same site deployed on Vercel

I have deployed my personal website built using Astro on Cloudflare Pages as well as on Vercel. It is a static website. Pages: https://flashblaze-astro.pages.dev/ Vercel: https://flashblaze.xyz/ ...

How do I get cloudflare pages to not install python?

I'm running pages on a subdirectory of a python+bun repo. The page being built doesn't need python. Unfortunately, every build seems to begin with the long process of installing python, probably because there's a .python-version file at the repo root. I'd like to skip this step. I have SKIP_DEPENDENCY_INSTALL=1 but this doesn't seem to help. Somebody online suggested setting PYTHON_VERSION to be whatever's default in the build image, but this doesn't seem like a good solution (it would break if...

does cloudflare automatically updates the submodule in the repository?

I have a folder which is a submodule, does cloudflare automatically pulls it?

Restrict API Token to single Pages site

Hello, is there any way to restrict an API Token's Pages Read and Edit permissions to a single Pages site? I don't want the token to have read/write access to all of the Pages on my account. I'm surprised that this doesn't seem to be possible - so I'm wondering if I'm just doing something wrong. Thank you in advance!

Pages upload limits

Hey there! I can see the stated file limit for Pages/Workers is currently 20k. We're leaning hard into a fully static build using 11ty for an Australian business news site, and are already hovering around the 15k mark. We're also looking to implement full site search via Pagefind, which introduces another new file for each searchable item in the build. Basically, we're going to hit that 20k limit real fast! We previously had a split build, some static, some on-demand -- but the full site search we're hoping to use requires everything to be built to make the index....

_routes.json not being leveraged

I have an TanStack Router SPA that is leveraging a _routes.json. The page loads fine, but we're finding that when an asset is missing from under /assets/* it returns the SPA 404 page which then breaks all manner of things due to it return html when the mime types requested are css/js. Am I configuring this incorrectly? ``` { "version": 1,...

How do I reinstall the git integration?

would be nice if it told me how one would go about doing that in the first place. Ideally I wouldn't want to remove the page and re-deploy it from 0...
No description

Deploy failed due crypto and buffer

Hello, greetings. Please I need a little help, I just deployed a Sveltekit app to CF pages. I decided to use, node: crypto and node:buffer as the docs says they're supported. I also added a wrangler.json file with node-compact flag....

There is an internal issue with your Cloudflare Workers & Pages Git installation

Was working on deploying some changes to a static site I have on pages and noticed that merging into main on Github was no longer triggering builds. It had been working fine several months ago, but it seems like new permissions were required and Github uninstalled the Github app. I've since reinstalled it on Github, but the deploys no longer work. Attached is the error I'm seeing at the top of my settings. Anyone have any ideas?...
No description

How to configure Cloudflare Pages with Alibaba Cloud CDN and a root domain (keenmind.me)?

Hi everyone, I’m trying to integrate Cloudflare Pages with Alibaba Cloud CDN to accelerate access for users in mainland China. I would really appreciate some guidance from Cloudflare staff or anyone who has experience with similar setups. ⸻...

perfect until 'Deploying to Cloudflare's global network' and Build took too long and was timed out

deployment ID - ac3d8d03-3be7-4d97-854c-c69d82286242 wellbeingassistant.gautambinu1304.workers.dev...

Turborepo React Vite: build output directory contains links to files that can't

Hi, I am getting the following error after a succesful build of my frontend app: 22:02:18.072 Failed: build output directory contains links to files that can't be accessed...

Use wrangler v4 in Pages builds

Is there any way to specify the Wrangler version for the deployments via git integration? We're using wrangler v4 for local & manual deployments because we're using RPC and want/need the explicit-resource-management (using keyword). However, the automatic build/deploys are using wrangler 3.101.0 and thus choke on the using keyword. I've seen several similar questions about specifying the version but none have a response 😦...

Pages on www. custom domain

Hi all, I'm looking to host a static site on Cloudflare Pages using a custom domain. I want the www subdomain to be the canonical version, and I’d like visitors who enter the non-www (apex) domain to be redirected to the www site. Could someone help me with the following questions?...

How can I inspect what is causing my requests?

I have a ton of requests that I want to figure out where are coming from. Is there a way to inspect that?

pages bug in bunjs

Bun v1.2.9 is installed successfully! 09:41:23.819 Executing user command: bun run build 09:41:24.024 $ bunx --bun vite build 09:41:24.043 Resolving dependencies 09:41:24.537 Resolved, downloaded and extracted [130]...