my next js project building fine locally, but on cloudlfare, it keeps on building for hours, but doe
my next js project building fine locally, but on cloudlfare, it keeps on building for hours, but does not finish
apps/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

signIn is a server action here

DO from a next-on-pages app (with the DO running on a second terminal - hono.dev app).env.d.tswrangler dev session and a Worker (or Next in this case) in another sessiondeclare 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",export async function GET(request: NextRequest) {
const counterId = getRequestContext().env.COUNTERS.idFromName('A');
const stub = getRequestContext().env.COUNTERS.get(counterId);
const counterValue = await stub.getCounterValue()
return new Response(counterValue)
}import { type Counter } from '@packages/counterdo';
interface CloudflareEnv {
COUNTERS: DurableObjectNamespace<Counter>
}const counterId = getRequestContext().env.COUNTERS.idFromName('A');const normalizeSrc = src => {
return src.startsWith('/') ? src.slice(1) : src;
};
export default function cloudflareLoader ({ src, width, quality }) {
const params = [`width=${width}`];
if (quality) {
params.push(`quality=${quality}`);
}
const paramsString = params.join(',');
return `/cdn-cgi/image/${paramsString}/${normalizeSrc(src)}`;
};