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

Persistent error while deploying hugo site to Pages

I've been hitting an error while deploying my hugo site to Pages. The deployment ID is: f4dc09c6-99e9-4acf-ade5-878a3c83a83d Here's the deployment error log: ```09:22:37.124 Uploading... (6850/13645) 09:22:43.013 /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:29573...

context item seems not to persist from middleware to middleware and from middleware to function

I found this behaviour trying to set up a session object and attach it to the context in the root middleware, expecting to see it bubble up the middleware chain and eventually into the "leaf" function. Tagging @HardlyWorkin' after asking consent. In the root middleware I attach a function to context and add a field: import { HCContextSetup } from "./libs/HorseCollar";...

520 error on my page

I don't know why my page pushs the 520 error, the thing is when I open my page from localhost or ip it works (when cloudflare is paused). Some help please. I've been checking for two hours and i don't what to do. Page: ticketsmanagers.app Account ID: 52797855300a3285cc3f9e180c0b6bae Error: 520...

Image Transformations via Pages Function doesn't seem to work

I'm trying to implement CF Image Transformations through workers (in my case, a Pages Function), but the image does not seem to get transformed. According to the troubleshooting page, the response should contain the Cf-Resized header, but it does not. - The feature is enabled in my cloudflare account - There shouldn't be any other workers running on the same request - The feature is enabled in the correct zone (dashboard > Images > Transformations > <my-domain.com> is enabled, and even "Resize from any origin" is checked even though that shouldn't be needed for workers....

Error when following "Deploy a Hono site" instructions

Following instructions for https://developers.cloudflare.com/pages/framework-guides/deploy-a-hono-site/ On the step (To serve static files like CSS, image or JavaScript files, add the following to your src/server.js/ts file:) I get the error Property 'ASSETS' does not exist on type 'Bindings'.ts...
No description

Example of setting up staging and production environments

I’m trying to set up separate staging and production environments for my Pages app, does anyone have examples of how they did it? I’m not sure whether I should contain everything in one “app” in the CF dashboard with a dedicated staging branch, or have a totally separate “app” for staging. It seems like 1 app would be easier for maintenance, however the env settings for the preview branches and staging will have to be exactly the same. Alternatively 2 apps would make it easier to manually promote certain versions to staging, and also let me test preview branches connected to either the staging and production databases as needed....

Help debugging 500 errors?

Hi all - currently have a Remix app that has been working well, but I've pushed some changes that work locally but not on prod. I've tried using wrangler tails and function live streaming to see what the error is, but they're just displaying 200 SUCCESS instead of any useful error output?

How to access to binding variables during nextjs build process?

I'm trying to user D1 with drizzle orm in next js, currently using next auth 5, and using drizzle adapter for that.. How to get the DB instance during build? export const { handlers: { GET, POST }, auth, signIn,...

Website works in pages domain but not in custom domain.

I'm facing this weird issue while hosting next js website with cloudflare issue is that the website works in pages.dev domain but doesn't work in custom domain

Build Node/PNPM version errors

Trying to deploy a new SvelteKit project created with pnpm create cloudflare@latest Build log: ``` 16:21:59.225 Found wrangler.toml file. Reading build configuration......
No description

Call worker from pages

I have a really simple website (remix) built and deployed with pages. I have contact form that when submitted sends an email. Currently I have it setup so that there is a worker running on different domain, and when the form is submitted my action function makes a request to the other domain and the worker on that domain sends the message. My question is, is there a way to call email send script/worker directly such that it can all be hosted on a single domain. I would set up all the required bindings and so on. Basically, can I call my mailer.js script from inside a remix function?...

Creating a cloudflare pages website using GO

I am trying to create a website and deploy it using cloudflare pages using GO. I've managed getting into the build phase and it correctly builds the application and I assume that the binary gets to the specified path. After this the website is not accessible, it seems as if it does not know how to run the binary. How can I achieve this? My build command in pages is: go build cmd/main.go build...

failed deployment with no details

Recently my deployments keep failing with no logs or information. I am building my react app with vite in GitHub actions and using the wrangler action to deploy. The action reports success but on the dashboard it says failed. Here’s one of the deployment IDs: b28e7166-295c-492b-af25-f97a22ec546f It seems like it started after I added the react email package, but I’m not sure. It works fine locally so I don’t know why it wouldn’t work when deployed....

Github integration for Pages apps in monorepo

I had mixed success this weekend attempting to use the Github integration in a monorepo with some Pages apps. The main reason I'm doing this is to get the UI for branch controls . I don't want to control Production/Preview rules with an API request. I started out trying to add the Pages project by pointing to the directory where it was located. That found the wrangler.toml but failed running the build command (seemingly because remix wasn't in the path I also tried from the monorepo root and that failed to find the wrangler.toml (expected. there isn't one in the root) but the build command (scoped to the app directory) did work....

Deploy failed in the cloudflare dashboard, but success in the cli.

The deployment id is: e359de58-8dc9-4deb-86d7-91de59e85324 , you could try this branch https://github.com/iflamed/hono-react-ssr-shadcn-ui/tree/prisma-debug to deploy it by self.

Failed Deployment

Similar to this post: https://discord.com/channels/595317990191398933/1236032759923736668 I have tried deploying in vain, the deploy succeeds when using npm run deploy but ultimately fails with no logs or indication of the is causing the problem. The deployment id for the last deploy is 554ebc67-f85b-433f-8e65-9a9a53ea0259...

How do I setup a github action to deploy to production and not preview?

Below is my current github action which does work for preview deployments. I'd like to be able to deploy from production for it. ```yaml name: Deploy on:...