N
Nuxt9mo ago
MTG

Infinite building time when deploying on Vercel

Hi, I have been working on a website using Nuxt a year ago and now I tried updating the Vercel build with the rewrite I've done throught the year but sadly after building the nitro server, it stuck with no error. I tested node version 18.x and 20.x. Adding the Vercel Edge function to the build command made an error. The project is now on Nuxt 3.11. and idk what to do honestly without an explicit error code: The full build log is below
9 Replies
MTG
MTGOP9mo ago
MTG
MTGOP9mo ago
Update: After 45 minutes the build failed (without additions to the build log btw) So nothing happens Vercel asks you to buy a subscription to have support
kingtimm
kingtimm9mo ago
Have you tried nuxi build with the vercel preset locally to see if it does something similar? What’s your vercel build settings.
MTG
MTGOP9mo ago
I have done some reseach and it appears that defining a custom nitro plugin totally broke the building process
MTG
MTGOP9mo ago
No description
MTG
MTGOP9mo ago
This plugin has the goal of initialising Mongodb globally as to not spam / initialize a different connection at every moment the server needs to made an request the ~/server/index.ts
No description
kingtimm
kingtimm9mo ago
Is this trying to run on an edge function in vercel? Long running connections might not be a solution for serverless.
MTG
MTGOP9mo ago
No it's a "normal" build Using edge function is a solution or I really have to instanciate a new mongodb connection everytime there's an request ?
kingtimm
kingtimm9mo ago
New connection per request with serverless products like vercel functions.
Want results from more Discord servers?
Add your server