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
Ccutlo5/12/2024

is it possible to use a service binding

is it possible to use a service binding while developing locally(next dev) to a worker that is already deployed?
Llaurent5/11/2024

Update: I think I've got the Next.js app

Update: I think I've got the Next.js app in a satisfying state: - Moved most server components and server action "magic" to good old client components with api routes HTTP calls from the user's browser. - The data flow just makes more sense mentally, and it gives you a chance to test backend logic from outside the nextjs app (with postman for example). - With Tanstack Query client side you can also retry queries if they go wrong or while waiting for a database update for example....
Bbun5/4/2024

anyone using baselime with next-on-pages

anyone using baselime with next-on-pages? if so, how?
Ccj5/3/2024

How do I fix the type issue though?

How do I fix the type issue though? Also, there are no docs on how to use DO with next-on-pages. I had to dig through discord to find "how to do it"...
MMick5/3/2024

Have we got a solution yet for static

Have we got a solution yet for static pages requiring
export const runtime = 'edge'
export const runtime = 'edge'
no matter what? I have many pages which are static and I have to mark them as edge runtime and that produces functions for them and now my project won't upload saying it's over the limit
ETEusebio Trigo5/2/2024

Crossposting here as it is not as broad

Crossposting here as it is not as broad as pages, I have an application deployed on cloudflare pages, using nextjs and https://github.com/QuiiBz/next-international. In local, switching languages works OK, and it is kept through navigation. Once the user (me) starts navigating, the selected locale is forgotten: https://discord.com/channels/595317990191398933/1232710382762852352
Bbun5/1/2024

nope that works perfectly

nope that works perfectly
Ff7f7u7f74/30/2024

I've set up clerk (core v2) with next-on

I've set up clerk (core v2) with next-on-pages for tRPC authorization. I'm using the clerk middleware: ``` import { clerkMiddleware, createRouteMatcher } from "@clerk/nextjs/server"; import { NextResponse } from "next/server";...
NNob4/12/2024

```export default async function Page

```export default async function Page() { return ( <div className={ "flex flex-col justify-center items-center min-h-screen py-2 w-full"...
JJames4/11/2024

We have no knowledge of what happens

We have no knowledge of what happens when Next.js builds your application, so I don't think it would really be possible for us to do that
Tthanhle3/29/2024

Hello everyone: I have a question about

Hello everyone: I have a question about the vercel output on next-on-pages: - When I manually change the index.html file (I got this index.html after running “npx @cloudflare/next-on-pages” in the folder to generate the .vercel/output/static folder) in the .vercel/output/static: I mean manually change the text in the index.html from “TestingA” to “TestingB” - Then deploy the static asset and _worker.js to the Pages use wrangler CLI. - But when I visit the website, I still see the text “TestingA” in the home page, even I check the response on the network tab: it show text “TestingB” (as I expected) in the index.html Can you explain why I observed this situation?...
Ccodewansh3/28/2024

Hey Guys, I am stuck on this issue while

Hey Guys, I am stuck on this issue while using next-on-pages next-dev module, not able to get local bindings working, (I am currently in process of using t3 stack with next-on-pages & d1 as database)
No description
Jjuanferreras3/25/2024

I ended up reporting https://github.com/

I ended up reporting https://github.com/cloudflare/next-on-pages/issues/722, as I think if solvable it could help mid/large projects move successfully to Cloudflare. I wasn't able to trace the issue, as I do see the routes being lazy loaded perfectly (e.g. await import(item.entrypoint)) but can't really see what wrangler is doing internally (tried --no-build with an upcoming fix and also debugging internally and couldn't really see anything wrong, route-specific code seems to be only in additionalModules, etc.). If anyone's have any ideas or things worth trying, I'm happy to try it out! Thanks!...
JJeff3/23/2024

It seems that passing of specific `x-

It seems that passing of specific x-vercel-* or cf-* headers was triggering this. The headers were coming from next/headers and may have gotten mixed around by all the trpc context switching going on in the T3stack boilerplate. If anyone runs into this I just wrote code to strip any of those headers being sent on UI requests
Jjuanferreras3/21/2024

profiling timings in next-on-pages (CF workers)

we've been adopting next-on-pages recently and it's been working really, really great (kudos to Dario/James/any other contributors I might be missing!) (on a somewhat similar note to the messages above) I did want to know if either of you had any methods to reliably profile timings in Cloudflare workers – we were surprised to see that: ``` const t0 = Date.now();...
PPepijn3/21/2024

Hi Dario, could you elaborate on the

Hi Dario, could you elaborate on the existing drawbacks and issues? Just starting with next on pages and seems to run fine for us, but before making a switch from Vercel with big projects, want to know the ins-and-outs
PBPat Branchaud3/20/2024

Does —turbo flag apply for cloudflare

Does —turbo flag apply for cloudflare next-on-pages ??
PPepijn3/19/2024

I also have another issue with next-on-

I also have another issue with next-on-pages where sometimes the revalidateTag in a server action is returning the error: "Error: Invariant: static generation store missing in revalidateTag X"
MHHMahbub Hasan Hira3/19/2024

and my nextjs version is 12.1.0

and my nextjs version is 12.1.0
Next