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

Passing env variables when deploying page application with wrangler

Hello, Is there a way to pass environment variables when deploying with "wrangler pages deploy" ? I tried creating a wrangler.toml and configured the vars there as in Workers docs, but it seemns that it doesn't work....

CF returns 522 for domain (eroticxholidays.com) after stop of using pages

I deleted all custom domain settings, cname, I deleted even pages website - nothing helped. I even deleted CF account and made new one, nothing works if you use CF proxying - it will return 522. My host is 100% normal due it serves different domains via CF....

Page blocked from indexing

Optimizing my site and stumbled upon this under the SEO section. I have not set this rule in any of my code. How do I resolve this issue?
No description

Cloudflare Pages and Turborepo

Hi friends. Question: I'm building some app with Vue, using Turborepo and of course Cloudflare Pages to present it. I'm getting errors about missing node features like crypto or buffer, coming from Worker directory (api). I've created a wrangler.toml file with the configuration that is enabling these features but seems like CF does not see it. Where should I place the configuration file, in the root of monorepo, worker folder or in the front-end app? I've tried multiple variants and nothing work...

Remix Vite and cdn resources

Hi there, I have a Remix project using the new Vite build tools, all working as expected locally. I am using the vite external and output paths functions to use SyncFusion controls from their CDN network. However when i publish the site to CF Pages, I am getting a build error that it can't find the module... Error: Failed to publish your Function. Got error: Uncaught Error: No such module "https:/cdn.syncfusion.com/ej2/21.1.35/ej2-react-base/dist/ej2-react-base.min.js". Is there a setting somewhere that will allow this type of setup. The reason I had to do this was because of the 1Mb limit with functions....

Accessing KV bind on Vue Script from import.meta

Hi all, been digging a while and haven't found something close. I've bounded the KV with namespace kv and tried to make use of it between Vue components script part like: await import.meta.kv.get('key') both preview and production say can not read get of undefined. Wouldn't this be the way to interact with kv ?...

Configure Cloudflare domain to point to a Pages project

Hi, I just bought a domain name on Cloudflare and went through the guided setup to point it to a newly creates Pages project. Yet, when I use that domain to go there, it doesn't work and I cannot figure out any error at all. The domain is : maisquelleid.com The Pages project is currently at: https://maisquelleidee.pages.dev/ All I did was follow the wizard in the Portal i.e. click on "Add Pages Site" from within the registered domain's config page (See screenshot)...
No description

Stuck in building and deploying

My project is stuck in building and deploying, because my index.js has a setTimeout (in scheduleRefresh) that repeats once per day. How do I tell the build function to not get stuck here?
No description

AdapterError when login

I got adapter error when login using next-auth@beta. Error: PrismaClientKnownRequestError: \nInvalid prisma.account.findUnique() invocation:\n\n\nCannot fetch data from service:\nReflect.get called on non-object\n....

Add free subdomain from Freedns.afraid.org to Cloudflare

First of all, i'm nowhere near an expert (Never used cloudflare before). I want to expose my application through a cloud flare reverse proxy. I want to use a free subdomain from freedns.afraid.org. How would i approach this, is this even possible? (From what i can see i can enter a NS entry for the subdomain in the FreeDNS web interface) Thanks in advance...

Error during build time in cloudflare page

HI folks, anyone had this issues before? i try to deploy my webapp and i got this error today, previously it was working ok. i'm using sveltekit ...
No description

Sveltekit actions on pages with smart placement

Hello, I host sveltekit on cf pages pro and have smart placement enabled but cf-placement header is always local-X so placement is not working. Wondering if sveltekit actions are not meant to work with smart placement or if there are any other work arounds? Because my backend is in EU I would like my actions to run on EU for optimal latency when possible thanks in advance!...

Unable to add a custom domain

I'm trying to add a custom domain for my Pages project but it says inactive even though my CNAME record has propagated. I checked the network tab and I see an error that says -
SSL Validation encountered the following errors: CAA records block issuance. Please remove all CAA records or add records for this authority (pki.goog)
SSL Validation encountered the following errors: CAA records block issuance. Please remove all CAA records or add records for this authority (pki.goog)
...

jest and Response

I'm using Jest to write tests a Functions app I'm writing. How do I get the Response text?...

CF Access OTP Request Form language

Hi folks! I have a Pages subdomain behind CF Access, we use Login codes sent by email to prevent unauthorized access. Is there a way to replace both email and Login code request form language from English to another language? My audience is made of Portuguese speakers.

Branch name preview aliases not being created

Hi! I'm running a github actions CI pipeline to create cloudflare preview deployments for every pull request using https://github.com/cloudflare/pages-action. https://developers.cloudflare.com/pages/configuration/preview-deployments/#preview-aliases mentions that preview aliases should be created automatically with the format <branch>.<project>.pages.dev. However I'm not seeing any preview aliases being created except for head.<project>.pages.dev. Otherwise the preview deployments are working fine and are accessible at <hash>.<project>.pages.dev. Could anyone help me figure out why the branch name preview aliases are not being created?...

Is there any edge sub-dependency problem work-around?

I have been using Cloudflare Pages for my deployments, sometimes Vercel depending on the project, but I haven't self-hosted anything for a while now. For my current Nuxt project, I rely on MongoDB as a database, but MongoDB doesn't seem to be Edge-compatible due to some dependencies. Deployments are therefore not running on Edge, but I would hate to develop the project without Cloudflare Pages. Apart from small projects like https://github.com/drivly/mongo-fetch, are there any other workarounds...

Deployment notification timestamps

Is there a "bug" in the pages deployment notifications? I get the same timestamp for a EVENT_DEPLOYMENT_STARTED and the following EVENT_DEPLOYMENT_SUCCESS I don't see how that should be possible given that it takes between 10-60 seconds when it runs....

Can't import modules from ['/src/index.tsx','/app/server.ts']

I have a cloudflare pages project that deploys a honojs api, but when I deploy it, after the build has succeeded and the assets have been uploaded, I get this error:
Error: Failed to publish your Function. Got error: Uncaught Error: Can't import modules from ['/src/index.tsx','/app/server.ts']
at functionsWorker-0.6801182622647344.js:958:9
Error: Failed to publish your Function. Got error: Uncaught Error: Can't import modules from ['/src/index.tsx','/app/server.ts']
at functionsWorker-0.6801182622647344.js:958:9
...