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

Wrangler deployment fails if functions folder exists

Hi all, I am having some trouble deploying a pages app with a functions directory. If I rename the functions folder so it isn’t included, the static site will deploy just fine. If I include anything in the functions directory it fails. The wrangler cli shows now errors and says it was successful, but the dashboard says the deployment failed with no error messages.

Can't find github organization

I have given all repository permission to #Cloudflare still it's not showing the organization here. What could be the issues here? Any possible solution?...
No description

How to enable unsafe binding in config

I am getting this error: Configuration file for Pages projects does not support "unsafe"...

Is it possible to link a page project in a mono repo to its own wrangler.toml

Hello guys, First of all thanks for the amazing tech & support. With the new release of the feature allowing pages in mono repo, i was wondering how to wire multiple page projects to their own wrangler.toml in a mono repo structure?...

What data does Cloudflare collect to facilitate the hosting of a Pages site

I am currently drafting the privacy policy for my website hosted using Cloudflare Pages and am seeking to understand the specific types of data that Cloudflare collects and processes in this context. My aim is to provide clear and transparent information to my website's visitors about the data that is collected when they access the site. From my understanding, Cloudflare provides performance and security enhancements and likely collects some data related to user interactions with the site. However, I have not been able to find detailed documentation that outlines exactly what data is collected, how it is stored, and for how long it is retained. Could anyone provide insights or direct me to resources regarding:...

Setting DurableObject from wrangler.toml results in an error.

DurableObjects created with CloudflareWorker can be registered with CloudflarePages. However, if I use wrangler pages download config <project-name> to create wrangler.toml and then deploy again, `This namespace no longer exists and can not be read from or written to. Please try using a different namespace. ```toml...

NextJS Dev Server keeps on crashing with D1

Randomly crashing when hot reloading, if there is a any syntax error while hot relaoding it's guranteed to crash with this error, if not it seems to be a 50/50. Anyone experience this? ```tsx tRPC failed on <no-path>: Invalid state: Controller is already closed /node_modules/.pnpm/[email protected]/node_modules/wrangler/wrangler-dist/cli.js:29573 throw a;...

[ERROR] Error: Pages only supports files up to 25 MiB in size

23:04:48.546 ✘ [ERROR] Error: Pages only supports files up to 25 MiB in size 23:04:48.547
23:04:48.547 pyodide/Fiona-1.8.22-cp311-cp311-emscripten_3_1_46_wasm32.whl is 29.8 MiB in size 23:04:48.547
23:04:48.548 ...

A hanging Promise was canceled

My next application is building successfully but when i go to the build url i see a 1101. Below is what im running locally to see the attached error screenshot wrangler pages dev .vercel/output/static --compatibility-flag=nodejs_compat...
No description

Custom environment variables set for a Pages project get lost

I have set up a small build as follows: https://github.com/survivejs/website-v3/blob/main/build.sh . In addition, I have specified several environment variables through the UI. Since I rely on workers in my Pages project, there is also wrangler.toml in place. The problem is that when building, it's reporting Build environment variables: (none found) and printenv doesn't show any of the environment variables I defined through the UI. Curiously it's also missing variables like CF_PAGES_COMMIT_SHA that should be there based on documentation. Do you know how to configure the project/Wrangler so that these environment variables don't get lost?...

Service binding with pages not working

Ive got a regular worker that im trying to bind to a pages worker so it can forward requests on to it using env.ui_search_trip.fetch(newRequest) ... However im unsure whether CF support binding pages to workers as when i run my deployment it fails attempting to bind
workers.api.error.service_binding_error: could not resolve binding "ui_search_trip": script
"ui-search-trip" not found [code: 10143
workers.api.error.service_binding_error: could not resolve binding "ui_search_trip": script
"ui-search-trip" not found [code: 10143
...

Querying for R2 object on develpment

hey! can i use r2 directly in pages? setting it through wrangler.toml. OR do i have to set it through a worker and then consume the worker from the pages app I currently have the first setup and I have effectively uploaded a R2 object but when calling it within my "wrangler pages dev" process, (in a Remix with Vite plugin app), I get null every time. Maybe I'm missing something?...

Nuxt + VueFire + Wrangler = 500

I have a Nuxt 3 application using VueFire which works fine in dev and build, except when using the CloudFlare pages nitro preset and being served on CloudFlare pages or Wrangler. In that configuration it throws 500 status and has errors talking about undefined fields but I could not successfully debug them. https://1e77ae88.teslemetry.pages.dev/ Deployment 1e77ae88-997e-4367-8390-686bb84fa199 ...

Auto-deploy from Github Not Working

Hey folks. The log is saying it deployed successfully, but there is a " No Pages config file found" error, and my page isn't updating. I've tried clearing the cache and turning on development mode. When I inspect the page, the code is outdated. The newly pushed code to my repo isn't live on the site, even though the build went through and says the deployment was successful.

Deploying Next.js site

```json { "name": "aksueikava", "version": "0.1.0", "private": true,...

Failed: Pages deployments stopped working

Hello, since today, our website is not deploying and started giving this error, and it is failling the
`13:36:00.964 Success: Finished cloning repository files 13:36:02.910
13:36:02.999 ✘ [ERROR] No Pages config file found...

next-on-pages process.env values are undefined

Hey! I was wondering if anyone has faced an issue where process.env values, such as process.env.NEXT_PUBLIC_API_URL is coming through as undefined on build? Both on deploy and preview with pages. In standard next development mode it works fine. I tried a normal next static export and serving that on a simple server, and that works fine. So somewhere in the cf build process I seem to be losing these values. I’m not using any of the cf services directly in this pages app, all that happens on a standalone worker (which is the api url im trying to connect to). ...

service worker not being served on live (CF Pages) but is locally

Hi possibly not the right channel, but I'm working on a push notification system which works locally but not on live. Looking at these screenshots (live 1st then local), the script url of the service worker is different and the browser extension I have have is not picking up the SW on live deployment. Any idea why this could be...? SW should be loaded in nuxt.config.ts ``` modules: [...
No description

What is the correct way of declaring a Service Binding (RPC)?

I've seen both services = [ { binding = "ADMIN", service = "todo-app" } ]...