Hello,
We're experiencing a reproducible issue with Production deployments triggered from GitHub.
Expected behavior
After a successful deployment, the application should become available immediately and all Serverless Functions should work normally.
Actual behavior
When a deployment is triggered automatically from GitHub:
- The build completes successfully.
- The deployment is marked as completed.
- The homepage (
/) loads correctly. - However, all Serverless Functions return HTTP 500 for several minutes.
The runtime error shown in the logs is:
Vercel Runtime Error:failed to load env vars:EnvFileReadError( Os { code: 2, kind: NotFound, message: "No such file or directory" })Affected routes include:
/api/conversations/api/profiles/api/conversations/:id/messagesThe frontend displays:
"This page couldn't load"
Important observation
If we deploy the exact same commit using:
npx vercel --prodeverything works immediately.
No code changes are made between the GitHub deployment and the CLI deployment.
Build logs
The GitHub deployment finishes successfully:
- Repository cloned successfully
- Dependencies installed
- Next.js build successful
- TypeScript successful
- Serverless Functions created successfully
- Deployment completed successfully
There are no build errors.
Additional information
- Framework: Next.js 16.2.6
- Runtime: Serverless Functions
- Deployments triggered from GitHub consistently reproduce the issue.
- Deployments performed with the Vercel CLI (
npx vercel --prod) do not reproduce the issue. - We also noticed there was a recent GitHub-related incident on the Vercel Status page today, although this issue persists specifically for GitHub-triggered deployments.
Could you help determine why GitHub-triggered deployments fail to load environment variables while CLI deployments work correctly?
Thank you.