@Hard@Work | R2 sorry to ping, but does the output above prompt any other suggestions?
@Hard@Work | R2 sorry to ping, but does the output above prompt any other suggestions?
dev session, then check if there are any other wrangler processes, and stop them?ps aux | grep wrangler revealed a handful of instances knocking round in the background... killed them all and problem solved! Thanks so much for your help!wrangler process(or two or three) get stuck, and don't shut down when they are supposed to, which can gum up everything elselsof -i :8787 or 8788, but these ones were on dynamic portsonRequestPost on the index.ts, no matter WTF I try, I always get a [wrangler:inf] POST /api/hotels 405 Method Not Allowed (4ms) :shrugg: it doesn't even go in (neither is my code returning this).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 undefineddevwranglerwranglerps aux | grep wranglerlsof -i :8787folderRoot/
└── functions/
└── api/
└── hotels/
└── index.tsonRequestPostindex.ts[wrangler:inf] POST /api/hotels 405 Method Not Allowed (4ms)wrangler pages dev _siteindex[id]/instagramrm -rf .wranglerdb.sqlTypeError: Cannot read properties of undefined (reading 'waitUntil')export const onRequestPost: PagesFunction<Env> = async ({ request, env, ctx }) => {
// ...
ctx.waitUntil(myAsyncFunction(env, anId));export const onRequestPost: PagesFunction<Env> = async ({ request, env, waitUntil }) => {