Remote Mode is not supported for Pages
Remote Mode is not supported for Pages
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 sessionrenderwrangler pages deployment tailsignInexport const runtime = 'edge'pnpm i wrangler@3.53.1DOError: Cannot access `Counter#getCounterValue` as Durable Object RPC is not yet supported between multiple `wrangler dev` sessions.env.d.tsProperty 'COUNTERS' does not exist on type 'CloudflareEnv'.ts(2339)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)}`;
};https://summit7-media.pages.dev/splash.pnghttps://summit7-media.pages.dev/cdn-cgi/image/width=96/splash.pngexport 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');