Next.js Discord

Discord Forum

An issue with deploying a NEXTJS application with Vercel

Unanswered
Scale parasitoid posted this in #help-forum
Open in Discord
Scale parasitoidOP
Hello all,
When I attempt to deploy my application to Vercel I am running into this common error:

Error occurred prerendering page "/".
TypeError: fetch failed.

What is confusing me the most about this is that when I run yarn run build everything works perfectly fine and I get no errors. I have already set up my environment variables in Vercel's project settings because I am using Sanity as my CMS. Any help would be appreciated as I have spent the last two days trying to figure out what is going on.

Github: https://github.com/Millsy24/portfolio/tree/main/portfolio

Thank you❤

4 Replies

Can you show the complete error message you're getting?
An also, have you set up correctly CORS origins for your project on Sanity's dashboard?
Scale parasitoidOP
Hello attached is the error message that I am receiving. Also I do believe that I have set-up CORS origins correctly. @not-milo.tsx
Giant panda
I'm also having Fetch problems on Vercel since today
but I'm getting ECONNREFUSED and ETIMEDOUT (while everything builds fine locally)