process.env you had used the same variable name for something else? .env into process.env.env too

❯ yarn wrangler deploy .vercel/output/static/_worker.js/index.js --dry-run --compatibility-date 2024-02-22 --name test
wrangler pages deploy not wrangler deploy, can you try that? 
node:async_hooks one), it's likely due to using the wrong commandwrangler deploy somewhere? 
Workers documentation, not Pages documentation....Pages documentation wrangler pages deploy)@cloudflare/next-on-pages, then take the .vercel/output/static/_worker.js manually gzip it and check the gzip's output size How do you get the env in a non request?all your source code is run inside a Cloudflare worker request handler, so you're basically always handling a request (i.e. you should always be able to run
getRequestContext)drizzle from working getOptionalRequestContext in that case and checking if you do or not get the request contextI managed to get next-on-pages -> drizzle -> d1 working with next auth for creating my users, so it was working fine for me? Weirdok, maybe sometimes/in some cases it works.... I really don't know to be honest
But when I was using process.env it worked on production but not locally and now that I am using env and getRequestContext it works locally but not in production lol
.env file? (those are only available/populated by next dev but not by wrangler pages dev nor in the deployed application)❯ yarn wrangler deploy .vercel/output/static/_worker.js/index.js --dry-run --compatibility-date 2024-02-22 --name testnode:async_hooksimport { getRequestContext } from "@cloudflare/next-on-pages";
import { drizzle } from "drizzle-orm/d1";
export const runtime = 'edge';
const { env } = getRequestContext();
const db = drizzle(env.DB);
export { db };