actually I do export that const in various places like my D1 functions folder
actually I do export that const in various places like my D1 functions folder
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 loadapps/nextjs/next-on-pages.d.ts file with --remote like you would via wrangler. It doesn't seem like getPlatformProxy accepts an option for this either?render functionwrangler pages deployment tail https://developers.cloudflare.com/pages/functions/debugging-and-logging/#view-logs-with-wrangler
declare module '@cloudflare/next-on-pages/next-dev' {
export function setupDevPlatform(): Promise<void>
}import { clerkMiddleware, createRouteMatcher } from "@clerk/nextjs/server";
import { NextResponse } from "next/server";
const isProtectedRoute = createRouteMatcher(["/start(.*)"]);
export default clerkMiddleware(
(auth, request) => {
if (isProtectedRoute(request)) {
auth().protect();
}
return NextResponse.next();
},
{ debug: true },
);
export const config = {
matcher: ["/((?!.+\\.[\\w]+$|_next)._)", "/", "/(api|trpc)(._)"],
};const createContext = async (req: NextRequest) => {
return createTRPCContext({
headers: req.headers,
auth: getAuth(req),
});
}; "message": "Clerk: getAuth() was called but Clerk can't detect usage of clerkMiddleware() (or the deprecated authMiddleware()). Please ensure the following:\n- clerkMiddleware() (or the deprecated authMiddleware()) is used in your Next.js Middleware.\n- Your Middleware matcher is configured to match this route or page.\n- If you are using the src directory, make sure the Middleware file is inside of it.\n\nFor more details, see https://clerk.com/docs/quickstarts/nextjs\n",