HumeAI / hume-evi-next-js-starter

https://hume-evi-next-js-starter.vercel.app
190 stars 71 forks source link

Errors while deploying in vercel #3

Open Adarshagupta opened 3 months ago

Adarshagupta commented 3 months ago
at t0 (/vercel/path0/.next/server/app/page.js:14:214522)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

digest: '3731050089' } Error at t0 (/vercel/path0/.next/server/app/page.js:14:214522) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { digest: '3731050089' } Error at t0 (/vercel/path0/.next/server/app/page.js:14:214522) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { digest: '3731050089' } Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error Error at t0 (/vercel/path0/.next/server/app/page.js:14:214522) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ✓ Generating static pages (5/5)

Also terminal:

⨯ app/page.tsx (12:11) @ Page ⨯ Error at Page (./app/page.tsx:23:15) digest: "279398420" 10 | 11 | if (!accessToken) {

12 | throw new Error(); | ^ 13 | } 14 | 15 | return ( ⨯ app/page.tsx (12:11) @ Page ⨯ Error at Page (./app/page.tsx:23:15) digest: "279398420" 10 | 11 | if (!accessToken) { 12 | throw new Error(); | ^ 13 | } 14 | 15 | return ( GET / 500 in 20684ms ⨯ app/page.tsx (12:11) @ Page ⨯ Error at Page (./app/page.tsx:23:15) digest: "279398420" 10 | 11 | if (!accessToken) { 12 | throw new Error(); | ^ 13 | } 14 | 15 | return ( ⨯ app/page.tsx (12:11) @ Page ⨯ Error at Page (./app/page.tsx:23:15) digest: "279398420" 10 | 11 | if (!accessToken) { 12 | throw new Error(); | ^ 13 | } 14 | 15 | return ( GET / 500 in 425ms

jaid-monwar commented 3 months ago

Hi @Adarshagupta , I was facing the same issue when running on my local machine. I did not try deploying it yet however I had similar errors with accessToken. This is how I FIXED my issue:

Solution:

  1. Open the file getHumeAccessToken.ts under utils folder
  2. Rename the variable clientSecret to secretKey in:
const accessToken = await fetchAccessToken({
    apiKey: String(process.env.HUME_API_KEY),
    secretKey: String(process.env.HUME_CLIENT_SECRET),
  });

That should fix your problem.