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

How I change Change My Website FIles In Workers And Pages

How I change Change My Website FIles In Workers And Pages i cant see any option

Solid's `clientOnly` only works with "Development Mode" enabled [solved]

Steps to reproduce 1. Clone this minimal repo https://github.com/AlexErrant/solid-start-cf-basic 2. pnpm i && pnpm build && pnpm run deploy 3. Observe that it works on the whatever-name.pages.dev domain...

Can't reinstate custom domain in Pages after mistakenly assigning it to R2 bucket

My Pages project, which was previously linked to a custom domain, euniceshome.com, is no longer working after I made a mistake in configuring an R2 bucket. What triggered the issue: I enabled R2 and created a bucket to manage assets for the domain. The Cloudflare interface suggested assigning the bucket to the domain, and I accepted the prompt, not realizing this would disrupt the custom domain connection for my Pages site. The site has since then gone offline with a 522 error....

Is react cache supported?

Hi, I'm developing in nextjs and deploying on cloudflare pages. Recently I'm exploring ways to move net requests to the server side to make client side simpler. One challenge is to cache the requests on server side. I learned that react has cache support like this: ```ts import { SupabaseClient } from '@supabase/supabase-js'; import { cache } from 'react'; ...

On Pages, how much am I limited to?

I'd like to make a site for many people to contribute documentation for their projects on a service, and I want to do it on Pages. It'd be a simple Github repo, with MD content. Say for example, 50 people have their own set of MD content spread over a few files, and are updating every once in a while. Is that okay, or will I be rate-limited with that much traffic?...

How to deploy Pages project with private NPM package dependencies?

Hey fellas, I'm trying to deploy a Next.js project with a private NPM package dependency to Pages, following https://developers.cloudflare.com/pages/how-to/npm-private-registry/#private-modules-on-the-npm-registry, I set NPM_TOKEN with an available value to both Production and Preview environment variables. But it still failed during building while deployment. Error says like "npm ERR! 404 Not Found - GET https://registry.npmjs.org/@aurora-quest/universal-authentication-types/-/universal-authentication-types-0.8.6.tgz - Not found". This project can be built successfully on my local environment with the same NPM_TOKEN value on Cloudflare, it's weird! Could anybody share some useful experience on this? That would be very appreciated!...

PNPM version mismatch issue

i'm deploying a Next.js project with pnpm vesion 9.0.0 and also setup the same in env variable but still it is picking up 8.7.1

Pages does not support custom paths for the `wrangler.toml` configuration file

I am trying to use the following command using an NX argument: wrangler pages deploy --config {args.wranglerConfig} but I get: Pages does not support custom paths for the wrangler.toml configuration file. Is this really the case + is there no option to work around this? I have wrangler.toml for acc and 1 for prod.

Internal Server Error

Hi, I have a question, I am using cloudflare pages to host my nextjs (ssr) application, it has localhost everything is ok, no errors, but after deploying a new version of the application on one of the pages it shows an error "Internal Server Error". It's not an application error, it's kind of like cloudflare, nothing interesting is recorded in the logs. Any ideas?

D1 env Binging is not working in next.js project

Hi I am trying to use d1 on /src/api/route.ts however I have error when building it. It cannot read the DB env even I have already set up on wrangler.toml and env.d.ts /src/api/route.ts: export const runtime = 'edge'; import { getRequestContext } from "@Cloudflare/next-on-pages"; import { NextResponse } from 'next/server';...

API returns 500, but domain is still added

Hi, Having some issues with the following route returning 500 but still adding the domain https://developers.cloudflare.com/api/operations/pages-domains-add-domain ...

Deployment updates to my Pages site are not reflected on the main url anymore

deployment url with 52570bff works fine as expected but the main page it doesnt seem to be reflected. maybe because i deleted all sites and only want to display a message on the 404 page at the moment. i also tried deleting the pages project but it gives me an error

GitHub Pages subfolders

Hi, I have a GitHub Pages site, let's call it ikaris.github.io I also have subfolders inside, like ikaris.github.io/site1 and ikaris.gituub.io/site2...

Build Requests `account_id` in Wrangler.toml but fails with `account_id`

https://dash.cloudflare.com/ab7347813b21ea6079df4cb18c4bb9e8/pages/view/exchange-traded-fund/952e6991-3192-47dd-9121-12b7bbce5d01 `` 00:30:22.332 ✘ [ERROR] More than one account available but unable to select one in non-interactive mode. 00:30:22.332 00:30:22.332 Please set the appropriate account_id in your wrangler.toml` file....

Question on multiple Branches custom domain Automated alias without updating CNAME everytime

staging works if i point latest to stagingdomain.com we use that to but if im in preview we deal with different branch names to test. branch1 go to ...

ci cd next on pages deployment error

``` - name: Deploy to Cloudflare Pages uses: cloudflare/pages-action@v1 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}...

`Error: Dynamic require of node:path is not supported` causes runtime error - how to troubleshoot?

My SvelteKit project on CF Pages builds successfully and has been great. All routes still work, except for a POST route, that gives this error. - I do not have node:path in my code (!) - I have nodejs_compat enabled (screenshot) - I removed deps and simplified this route ...

How to create a Cloudflare Pages website on non-standard ports such as :2345?

I have the source of an abandoned website, which is a website can run without server based on EJS. In the original server, the default port is set on :2345. I want to inherit this tradition of making the default port at :2345, but I want to use Cloudflare Pages to reduce the cost of a physical server. So how can I setup the website on port :2345 on Cloudflare Pages?

Every time I try to create a Cloudflare Pages, I encounter an error, but I can successfully create i

this is the response body of the request. { "result": null, "success": false,...