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

Hi, I have a turborepo including a Next

Hi, I have a turborepo including a Next project that is deployed on CF pages. Everything works fine, but build caching says 'Skipping build output cache as it's not supported for your project'. Is this due to using turborepo? The source directory to build in is set to the app directory. Or why would the build ouput be skipped?

the `persist` option of

the persist option of setupDevPlatform doesn't appear to be working as expected, unless I have it configured incorrectly ```ts if (process.env.NODE_ENV === "development") { await setupDevPlatform({...

Dynamic routes break my deployment

I see 🙂 , cool hopefully you can fix the issue, otherwise please do feel free to post here and we can try to help 🙂 (opening a thread should also help not making this noisy for everyone)

Hmmmmm the `getRequestContext` can't be

Hmmmmm the getRequestContext can't be called within an actions.ts due to edge runtime requirement. Gana have to find another way to populate data to a client component.

can i run --force here ?

can i run --force here ?
No description

```

const { env, cf, ctx } = getRequestContext();
Warning: The function cannot be called in code from components using the Pages router.
const { env, cf, ctx } = getRequestContext();
Warning: The function cannot be called in code from components using the Pages router.
is there any specific reason from this limitation? Can't really tell from looking in the codebase (meaning, why it wouldn't work on getServerSideProps or middleware)...

Can we use `service` bindings with

Can we use service bindings with getRequestContext()? I am trying to add it in wrangler.toml but it is undefined....

nextjs deployments not working correctly

Hey, I published a version of nextjs on a cloudflare page using git integration, but it's failing miserably. I would like some help ASAP if possible, the page build succeeds, but nothing of the page itself makes sense. ...
No description

Hi @mr nooli @Fineshop Design, I've

Hi @mr nooli @Fineshop Design, I've opened a PR that should fix this - please can you try this prerelease.

this is what we've got 😓 : https://

this is what we've got 😓 : https://github.com/cloudflare/next-on-pages/tree/main/internal-packages/next-dev#next-on-pages-next-dev it briefly mentions DOs but that's acutally not too too helpful I'm afraid.... I'll add a note here: https://developers.cloudflare.com/workers/wrangler/api/#getplatformproxy to better explain how to access DOs using getPlatformProxy (and we do defer to that page in our docs)...

Full-stack deployment · Cloudflare Pages...

Has anyone here successfully ran a next pages app with a D1 db locally? I did follow this setup and configuration: https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-nextjs-site/#use-bindings-in-your-nextjs-application Unfortunately I am not having any luck getting this to run....

Yes we implemented support for the fetch

Yes we implemented support for the fetch cache a long time ago. Please send code snippets of what you're doing

server action without declaring `export const runtime = 'edge';`

is there a way to make the server action be served on a separate URL & not in the page it's used in?

using just `next dev` not that i know of

using just next dev not that i know of but may be possible, im a huge donkey so hope im not leading you down the wrong direction, even now im wondering if i actually did create the KV in wrangler, or if it didn't just automatically do that, you probably already saw this but the internal github doc: ``` https://github.com/cloudflare/next-on-pages/blob/main/internal-packages/next-dev/README.md...

Anyone get D1 working with local

Anyone get D1 working with local development? I've tried every blog post and looked through here and can't seem to figure it out. I would be happy with developing against the remote DB or local DB. Every time I'm in dev mode it seems to be connecting to an empty Sqlite DB that doesn't have any tables in it based on the errors. I've tried putting my remote DB name/ID in the bindings or a local one and i get the same results. ```setupDevBindings({ persist: true, bindings: {...

Honeycomb · Cloudflare Pages docs

Hey community 👋 I have question about observability. Has anybody been able to successfully use Honeycomb plugin (https://developers.cloudflare.com/pages/functions/plugins/honeycomb/) with next-on-pages?...

That flag can only be set with Wrangler

That flag can only be set with Wrangler if you create a project with wrangler afaik, otherwise it needs to be set in the dashboard

Oh sorry yes, if you want to use pages:

Oh sorry yes, if you want to use pages:dev, you would need to run pages:build first. It builds the Next.js app via vercel's cli actually, instead of just next build, and then takes the output and transforms it, but yes, it does a normal build under the hood

Access to CF on Pages using Next.js

Does anyone know how to access the cf object in the headers when using next.js on CF? I'm trying to access botManagement and it's not set on the request.cf, nor it it part of the headers....