My .env file atm has nothing in it related to bindings, well when it worked using process.env I was

My .env file atm has nothing in it related to bindings, well when it worked using process.env I was using this:
env.d.ts
declare global {
  namespace NodeJS {
    interface ProcessEnv {
      DB: D1Database;
      DOCUMENTS_BUCKET: R2Bucket;
    }
  }
}

export {}


Now: (working local but not in production)
env.d.ts
interface CloudflareEnv {
  DB: D1Database;
  DOCUMENTS_BUCKET: R2Bucket;
}
Was this page helpful?