Danilo.Micucci
Danilo.Micucci

Reputation: 83

VueJS - The Serverless Function exceeds the maximum size limit of 50mb

I'm new working with VueJS and when trying to deploy my project to Vercel I'm getting the following error:

Error! The Serverless Function "index" is 64.76mb which exceeds the maximum size limit of 50mb.

I have spent a lot of my time trying to find a proper answer but I didn't find any. Here's the code for the Vercel configuration:

{
  "version": 2,
  "builds": [
    {
      "src": "nuxt.config.js",
      "use": "@nuxtjs/vercel-builder",
      "config": {
        "serverFiles": ["config/**", "locales/**", "mappers/**", "services/**", "helpers/**"],
        "maxDuration": 60,
      }
    }
  ],
}

Thanks for the help! Really appreciate it

Upvotes: 0

Views: 1339

Answers (1)

Izuorah Dubem
Izuorah Dubem

Reputation: 13

From the error message, why not check your project bundle size to see if the index file is up to 64.76mb after build? (You might be bundling a package, image or large file) that is leading to a large build size.

It can't be memory usage as vercel memory limit is 1024 for free account. Check this age: https://vercel.com/docs/concepts/limits/overview to see if it helps.

Upvotes: 0

Related Questions