Skip to content

fix(client): defer GROQ_API_KEY environment validation to runtime to prevent build crash#149

Open
Pratikshya32 wants to merge 2 commits into
Akshay473:mainfrom
Pratikshya32:fix-groq-api-key-crash
Open

fix(client): defer GROQ_API_KEY environment validation to runtime to prevent build crash#149
Pratikshya32 wants to merge 2 commits into
Akshay473:mainfrom
Pratikshya32:fix-groq-api-key-crash

Conversation

@Pratikshya32
Copy link
Copy Markdown

This pull request fixes a Next.js production build crash by moving build-time environment checks into the runtime functions.

Changes

  • Moved GROQ_API_KEY validation check from module initialization level to inside the callGroqAPI function scope in client/lib/aiSummarization.ts.
  • This permits next build to complete successfully in CI/CD and deployment environments where the environment variable is not defined at build-time.

Closes #148

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

Someone is attempting to deploy a commit to the akshay473's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
forensic-pro-suite Ready Ready Preview, Comment May 23, 2026 1:27am
forensic-pro-suite-7777 Ready Ready Preview, Comment May 23, 2026 1:27am

@Pratikshya32
Copy link
Copy Markdown
Author

PLEASE MERGE THIS PR INTO THE MAIN @Akshay473

@Akshay473
Copy link
Copy Markdown
Owner

Sorry for the delay,
Can you please solve the conflicts.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

Deployment failed with the following error:

Resource is limited - try again in 1 day (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/akshay473s-projects?upgradeToPro=build-rate-limit

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/akshay473s-projects?upgradeToPro=build-rate-limit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Missing GROQ_API_KEY environment variable crashes Next.js build-time compilation

2 participants