I'm dumbfounded and out of ideas.
I'm dumbfounded and out of ideas.
wrangler pages dev _site while in the root folder, I'm not a directory up or down, like this guy: https://community.cloudflare.com/t/cf-pages-functions-wrangler-dev-405-method-not-allowed-locally/442767/14 besides, even if I were, my other functions would've have worked anyway.index, or with path placeholders like [id], or dedicated endpoints like /instagram. I have more than one file with 'onRequestGet' and 'onRequestPost' on them, and they work just fine.rm -rf .wrangler ?db.sql that has a drop-table at the start anyway
TypeError: Cannot read properties of undefined (reading 'waitUntil')context is undefined


let cookie = request.headers.get("cookie")let cookie = context.request.headers.get("cookie")export const onRequestPost: PagesFunction<Env> = async ({ request, env, ctx }) => {
// ...
ctx.waitUntil(myAsyncFunction(env, anId));export const onRequestPost: PagesFunction<Env> = async ({ request, env, waitUntil }) => {let cookie = request.headers.get("cookie")let cookie = context.request.headers.get("cookie") const response = await c.env.HUB.fetch(
new Request(new URL('/account/signup', c.req.url), {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email } as SignupRequest),
}),
);// wrangler.toml
name = "hub"
[[services]]
binding = "HUB"
service = "hub"