I'm trying to host a Next.js project using vercel and some api calls in getStaticProps() uses api folder inside next.js pages folder. and this function also needs a full url so I can't provide only /api/get-products
. insted I have to provide something like http:localhost:3000/api/get-products
.
What should I do to make this build successfully on vercel. because if I run npm run build
. It builds sucessfully.
this is the error i'm getting on Vercel