leerob / leerob.io

✨ My portfolio built with Next.js, Tailwind, and Vercel.

Home Page:https://leerob.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Cannot read property 'reduce' of undefined

productivepod opened this issue · comments

Getting following error on vercel, once deployment starts

Error occurred prerendering page "/tweets". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read property 'reduce' of undefined
    at getTweets (/vercel/path0/.next/server/chunks/401.js:257:24)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async getStaticProps (/vercel/path0/.next/server/pages/tweets.js:52:20)
    at async renderToHTML (/vercel/path0/node_modules/next/dist/server/render.js:465:20)
    at async /vercel/path0/node_modules/next/dist/export/worker.js:269:36
    at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:75:20)

Hey! You probably needed to add an env var for Twitter.