Thank you, I tried that as well, and doesn't work. Did you manage to make it work?
Thank you, I tried that as well, and doesn't work. Did you manage to make it work?
npm create cloudflare@latest select "Website or web app" and "Next". Uncomment the KV section in wrangler.toml and app/api/hello/route.ts. start dev server npm run dev and visit http://localhost:3000/api/hello . If that works for you, then check that you have all the needed packages and correct versions (wrangler & @cloudflare/next-on-pages) etc.getRequestContext() on the edge and I can only set export const runtime = "edge"; within an api route, right? (Nextjs 14)use server within the files in your D1 folder? updateItem(id, value) that is called in client component via onClick.console.log("updateItem starts"), it doesn't even appear on CF logs. And what is strange, on CF logs there are multiple calls to the url (2-6 extra requests on average).
Could not find a declaration file for module '@cloudflare/next-on-pages/next-dev'. on import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev' in next.config.mjs. Any suggestions?GET /user thats is requested on initila page loadnpm create cloudflare@latestwrangler.tomlapp/api/hello/route.tswrangler@cloudflare/next-on-pagesgetRequestContext()export const runtime = "edge";use serverupdateItem(id, value)console.log("updateItem starts")Could not find a declaration file for module '@cloudflare/next-on-pages/next-dev'. import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev'GET /userimport {jwtDecode} from 'jwt-decode'
jwtDecode(headers().get('cf-access-jwt-assertion'))['email']BREAKING CHANGE: Since webpack 5 WebAssembly is not enabled by default and flagged as experimental feature.export const dynamicParams = false