EnvFileReadError crashing Functions and Middleware across two projects

Summary:
Two separate projects in my account are both crashing at cold start with the same Vercel-internal runtime error, before any of our application code executes:

Vercel Runtime Error: failed to load env vars: EnvFileReadError(Os { code: 2, kind: NotFound, message: "No such file or directory" })

Occurrence 1 — Node.js Serverless Function

  • Project: API backend (NestJS, deployed as a single api/index.js Node.js Function)
  • Error: 500: FUNCTION_INVOCATION_FAILED
  • Request ID: bom1::x9584-1784293362070-9e3e9c53bc61
  • Region: build in iad1, invocation in bom1

Occurrence 2 — Edge Middleware

  • Project: Next.js frontend, standard middleware.ts using @supabase/ssr
  • Error: 500: MIDDLEWARE_INVOCATION_FAILED
  • Request ID: bom1::dc6q8-1784295760739-560d7917758b

Why I believe this is platform-side, not application code:

  1. The error text is a Rust panic (EnvFileReadError, Os { code: 2, kind: NotFound }), not a JavaScript/Node error — it fires before our code runs.
  2. It reproduces identically across two completely different runtime types (Node.js Function vs. Edge Middleware) in two different projects, sharing no code or vercel.json config.
  3. I’ve audited both repos: no .env file is committed to git, no envFilePath override in either app, no .vercelignore.
  4. Redeployed the API project with “Use existing Build Cache” unchecked — same error, same message.
  5. Confirmed /health on the API project does work correctly when hit directly (returns valid JSON), so the deployment itself is healthy; the failure seems tied to specific invocation paths only.

What I’d like help with:
Please check server-side logs/traces for both request IDs above to identify what env-var-snapshot file the runtime expected and why it wasn’t present, and let me know if there’s an account-level setting or feature flag causing this

@erpaiguy-6406 GitHub deployments fail with EnvFileReadError but CLI deployments work - #2 by smaeda-ks