TypeError: Cannot read property 'reduce' of undefined
productivepod opened this issue · comments
Productive Pod commented
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)
Lee Robinson commented
Hey! You probably needed to add an env var for Twitter.