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

No matching export but builds and runs fine locally

``` 00:22:04.996 ✘ [ERROR] Build failed with 1 error: 00:22:04.996
00:22:04.997 ✘ [ERROR] No matching export in "../../node_modules/.pnpm/marked@15.0.8/node_modules/marked/lib/marked.esm.js" for import "Slugger" 00:22:04.997 ...

Unable to deploy in Pages despite `nodejs_compat` being set (SvelteKit and `pg`)

Hi, I have the following dependencies: ``` 23:56:16.139 dependencies: 23:56:16.139 + @sveltejs/adapter-cloudflare 6.0.1 23:56:16.140 + @sveltejs/adapter-static 3.0.8...

what value is CF_PAGES_BRANCH on main

what is the value if the github branch is "main" and it's in production mode? I thought it was main but this code doesn't work when the actual branch is main: const isPreview = import.meta.env.PROD && import.meta.env.CF_PAGES_BRANCH !== "main";

_headers with SvelteKit not applied?

heya, on my SvelteKit site using the cloudflare-pages adapter, I have a _headers file with this content and these show in the Headers tab of my CF deployment but the headers don't show in my network tab requests, any idea why? 🤔 ``` /* X-Content-Type-Options: nosniff...

nuxt / drizzle / cloudflare

Hi, When I deploy my app to cloudflare, I get a 500 error when retrieving data from my database on initial load, if I use the refresh method to get the data again it works fine. Locally works fine on page load. This is how I am using drizzle:...

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`."...

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...

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?...

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...