N
Nuxt8mo 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
MTGOP8mo ago
MTG
MTGOP8mo 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
kingtimm8mo 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
MTGOP8mo ago
I have done some reseach and it appears that defining a custom nitro plugin totally broke the building process
MTG
MTGOP8mo ago
No description
MTG
MTGOP8mo 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
kingtimm8mo ago
Is this trying to run on an edge function in vercel? Long running connections might not be a solution for serverless.
MTG
MTGOP8mo 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
kingtimm8mo ago
New connection per request with serverless products like vercel functions.
Want results from more Discord servers?
Add your server