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

workers-help

pages-help

general-help

durable-objects

workers-discussions

pages-discussions

wrangler

coding-help

kv

🦀rust-on-workers

miniflare

stream

general-discussions

functions

zaraz

âš¡instant-logs

email-routing

r2

pubsub-beta

analytics-engine

d1-database

queues

workers-for-platforms

workerd

web3

🤖turnstile

radar

web-research

logs-engine

cloudflare-go

terraform-provider-cloudflare

workers-ai

browser-rendering-api

analytics

next-on-pages

cloudflare-ai

build-caching-beta

hyperdrive

vectorize

ai-gateway

Remix app getting sporadic 404s on assets that are in the deployment

We are encountering a weird and hard to debug/reproduce behaviour on our deployed remix app on cloudflare pages, sometimes the build assets (/assets/<filename>.js) are suddenly no longer found. The requests for the assets are going through to the remix app loaders which tries to resolve them as a page (in a catch all route) even though they should never reach that stage since the files are present in the deployment, I can also find them in the detail view of the deployment in cloudflare pages. The strange part is that these deployed builds are working fine (since usually after a deploy a manual test is done) but after some time, out of the blue, these errors occur where the assets are not found and they also seem to resolve itself making it very hard to debug. In case this could be relevant, we generate a build in our ci/cd pipeline and upload the build with the wrangler command. ...

Page Build Failed An authorization header was used: Bearer ghp_[hidden]

use environment secret , build read env github token , token rule is all but build failed log output An authorization header was used: Bearer ghp_[hidden]...

Page Build Failed Fetch Timeout

site: wangiloka-website.pages.dev deployment ID: 9444d776-9569-4292-abf8-270dc1cfcfa0 account ID: 6ee6622938e4476e7efd68784656d893 I developed a JAM stack website. It uses Express.js on the backend and next.js export for SSG. I can build the project locally without problem using the production backend. But somehow in cloudflare pages the build is incosistent, sometimes it works well sometimes it failed because of fetch time out as the picture I attached. ...
No description

Can I use php?

Can I use php in pages? I have to make an upload page on my website.

Support estension domain

Hello What domain extension does cloudflare support? .com .org ?...

How to debug remix latency

I've got a remix app deployed the standard way (link below), on a mysite.pages.dev domain. I've got the actual domain mysite.com with cloudflare NS, and a worker which forwards all mysite.com to mysite.pages.dev, the remix app. Sometimes requests are really quick, but sometimes it's over 800ms. Going in the logs, I see over 300ms between the "eventTimestamp" and the timestamp of the first log in my "loader". Is such a gap normal? How can I debug what's happening between the start of the "event" and reaching my loader? thanks https://developers.cloudflare.com/pages/framework-guides/deploy-a-remix-site/...

deploying sveltekit in cloudflare pages. I got this error Cannot use "url" when deploying to Cloud

I change @sveltejs/adapter-auto to @sveltejs/adapter-cloudflare in svelte.config.js but when I build the project I got this error. Any idea how to solve this issue? ```> Using @sveltejs/adapter-cloudflare ✘ [ERROR] Could not resolve "url" node_modules/@google-cloud/firestore/build/src/index.js:20:22: 20 │ const url_1 = require("url");...

page is caching a JSON file that i have caching off for

i am so confused right now. i shut caching off and my JSON is still caching, does anybody know what's going on based on the images i am deploying via wrangler https://index.redbox.pics/src/static/images/index.json...
No description

Wrongfull Phishing Report

I just received the following message: ``` Hello, ...

How to Debug 500 Error After Deploying Astro

Hey guys, wondering how I can look at finding the logs for my pages app (free tier) using astro. It builds and deploys find, but when I visit the pages URL a 500 is returned immediately. When I run locally with Wrangler everything runs fine.
So, my question is - where can I find the logs (looks like they don't come w/ the free tier in CF) ? Otherwise I have no clue what is happening and no way to debug and solve the 500....

[ERROR] A request to the Cloudflare API failed.

I get an error message and can't deploy.
No description

"Failed to publish your Function. Got error: Unknown internal error occurred." on NextJS 14.2.15

I've been trying to deploy an application to cloudflare workers that was built with NextJS 14.2.15 using @cloudflare/next-on-pages 1.13.5. Unfortunately I keep getting the error Error: Failed to publish your Function. Got error: Unknown internal error occurred. I have tried both deploying by having the cloud build the project and deploy built assets from my machine to the cloud. Next-on-pages and wrangler work flawlessly on my side (with the exception of one strange error message which I've been able to avoid by cleaning the build directory each time I want to run). My account ID is: efac12d49017929d19bc2da47c87fd4d The deployment ID is: dfff50f3-cd1e-4748-b499-6657072bc639 I'd provide my pages.dev ID but I'd prefer for the project name not be publicly available for privacy....

Could not route to /client/v4/accounts/***/pages/projects, perhaps your object identifier is invalid

I tried to deploy react app in cloudflare pages in github action but I got this error Could not route to /client/v4/accounts/***/pages/projects, perhaps your object identifier is invalid? . This is my github action workflow ``` - name: Publish Static Files uses: cloudflare/[email protected] with: apiToken: ${{ secrets.CF_API_TOKEN }} accountId: ${{ secrets.CF_ACCOUNT_ID }}...

How to add subdomain?

How to add subdomain in cloudflare page like www.subdomain.hostname.pages.dev like that.

customize npm install command on cloudflare pages

I have a monorepo and would like to avoid installing every package on every build (even packages related to applications that are not being deployed). is there a way I can customize the npm install command to add a filter so it doesn't install unnneeded packages?...

MP4 files on Cloudflare Pages - Question

Hello, does anyone know if it's allowed to host .mp4 files using Cloudflare Pages?

Force buildsystem v2 to use --legacy-peer-deps

I set my build command to npm install --legacy-peer-deps, but it is still installing with clean-install Tried setting this to true, but no luck https://discord.com/channels/595317990191398933/1020053805263507577/1104506977788366908 I cannot find any documentation on how to fix this, and if you search this discord there are hundreds of people running into the same issue / asking the same question....

Worker Secret missing after deploying Worker

Hi, I have a Cloudflare Worker that I have connected to my Github Actions pipeline to automate deployments after pushing to a specific branch. I created a secret for the worker in the dashboard and it seems when I push my code, the secret is removed/deleted, which obviously breaks the worker script. Am I potentially doing something incorrectly?

How do you set the "copyright year" dynamically in Pages?

Hello everyone, I am deploying a static website on Cloudflage Pages and want to dynamically set the copyright year so I don't have to update every year (2024, 2025 etc). When I deploy it shows year 1970. Locally it works fine as it's picking up the year on my machine which is correct.

Preflight requests to static Pages are returning 405

I am trying to use cloudflare pages as static html content fetched by a SPA with a separate FE domain. Since the domains are different, browsers send an OPTIONS pre-flight request for each resource. CF Pages currently returns a 405 status code to any OPTIONS request. Is there a way to handle these pre-flight requests without a worker or CF function since that would get very expensive quickly. I've also tried to bypass these preflight requests to a separate domain with a rewrite rule, but tha...
Next