nuxt / vercel-builder

Vercel Builder for Nuxt
MIT License
645 stars 75 forks source link

Vercel build logs multiple error when building serverless #722

Open paullacour opened 1 year ago

paullacour commented 1 year ago

I'm having troubles on one of my Vercel deployments using @nuxt/vercel-builder. Builds went from ~2min to 30+min and when I take a look at my build logs, I have thousands of lines of NowBuildError logged. (see above example:

Capture d’écran 2022-10-14 à 14 02 15 Capture d’écran 2022-10-14 à 14 02 25

I've successfuly isolated the issue, which comes when I'm building my 2 serverless functions using @vercel/node. If I comment this out in my builds in vercel.json, it works fine.

vercel.json

{
  "version": 2,
  "builds": [
    {
      "src": "nuxt.config.js",
      "use": "@nuxtjs/vercel-builder"
    },
    {
      "src": "api/*.js",
      "use": "@vercel/node"
    }
  ],
  "routes": [
    { "src": "/api/validate-vat", "dest": "api/validate-vat.js" },
    { "src": "/api/mailchimp-signup", "dest": "api/mailchimp-signup.js" },
    { "src": "/(.*)", "dest": "$1" }
  ]
}

"@nuxtjs/vercel-builder": "^0.22.1"

I've re-created a minimal example here: https://github.com/paullacour/nuxtvercel

danielroe commented 1 year ago

Does this occur when not using @nuxtjs/vercel-builder?

paullacour commented 1 year ago

@danielroe When I yarn build locally it works just fine. I haven't tried deploying it to Vercel without @nuxtjs/vercel-builder because I need SSR rendering on this specific project...