Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: Since 0.22 update," Build Failed The Serverless Function "index" is 73.15mb which exceeds the maximum size limit of 50mb." #633

Closed
madebyfabian opened this issue Sep 28, 2021 · 15 comments

Comments

@madebyfabian
Copy link

Since 0.22., the vercel builder does not work anymore. It errors with the message

Build Failed
The Serverless Function "index" is 73.15mb which exceeds the maximum size limit of 50mb.

Without me changing anything in the code. When I define an older version of vercel-builder manually in config:

{
	"version": 2,
	"builds": [
		{
			"src": "nuxt.config.js",
			"use": "@nuxtjs/vercel-builder@0.21.3",
			//...
		}
	]
}

it works like it should. Why is the 0.22 release breaking, and it's not a major relase (going up to 1.x)? Since now all projects that haven't defined a specific version of the vercel builder in config, will fail.

Copy link
Member

danielroe commented Sep 28, 2021

@madebyfabian Would you check to see the size of a previous function (as produced by 0.21.3)?

@madebyfabian
Copy link
Author

@danielroe thanks for your answer, I would really like to tell you what the build size with 0.21.x is, but I couldn’t find anything in the logs, regarding to the size of the function. Am I missing something?

Copy link
Member

You can find it out in your deployment details view.
CleanShot 2021-09-28 at 20.00.54@2x.png

@madebyfabian
Copy link
Author

madebyfabian commented Sep 28, 2021

@danielroe Ah, I see. Too obvious 😄.
59E45927-F4B1-4491-B767-6D12853E6352

It’s 8,73 MB.

Copy link
Member

@madebyfabian Yes, that is suspicious! Would you provide a reproduction?

@madebyfabian
Copy link
Author

@danielroe I've setuped a completely blank nuxt project for reproduction. With create-nuxt-app. With absolutely nothing in it besides the demo component/text. https://github.com/madebyfabian/vercel-builder-issue-reprod. And it's at 30MB when using 0.22.x, with a build time of 1m 16s:

[log] Running with @nuxt/vercel-builder version 0.22.0

Bildschirmfoto 2021-09-28 um 21 33 18


When using 0.21.0, it's at 54s build time and at only 3MB:
Bildschirmfoto 2021-09-28 um 21 36 16

I can of course also give you access to the repo I am working and facing the issues, if that helps in any way.

Copy link
Member

@madebyfabian No, that's great - thank you.

Copy link
Member

@madebyfabian Should be released in 0.22.1 - thanks for catching this nasty little bug, which I'll follow up on (as it came from a dependency).

@madebyfabian
Copy link
Author

@danielroe Thank you very much for that quick investigation and hotfix, appreciate it!

@jeanpierreribeiro
Copy link

Since 0.22., the vercel builder does not work anymore. It errors with the message

Build Failed
The Serverless Function "index" is 73.15mb which exceeds the maximum size limit of 50mb.

Without me changing anything in the code. When I define an older version of vercel-builder manually in config:

{
	"version": 2,
	"builds": [
		{
			"src": "nuxt.config.js",
			"use": "@nuxtjs/vercel-builder@0.21.3",
			//...
		}
	]
}

it works like it should. Why is the 0.22 release breaking, and it's not a major relase (going up to 1.x)? Since now all projects that haven't defined a specific version of the vercel builder in config, will fail.

Hi, thanks for the tip.
But even flagging the version in vercel.json:

"use": "@nuxtjs/vercel-builder@0.21.3"

I still get the error:

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

@azelalynetan
Copy link

I've also get the same error during my recent deployment using vercel-builder 0.23.0.
Setting the version 0.21.3 works for me. Thanks!

@garyThrels
Copy link

Same thing happened to me, been getting:

Error: The Serverless Function "index" is 83.95mb which exceeds the maximum size limit of 50mb. Learn More: https://vercel.link/serverless-function-size

using vercel build version 0.22.1 fixed it for me

{
    "builds": [
        {
            "src": "nuxt.config.js",
            "use": "@nuxtjs/vercel-builder@0.22.1",
            "config": {
                "serverFiles": [
                    ".nuxt/dist/sitemap-routes.json"
                ]
            }
        }
    ]
}

@einzN
Copy link

einzN commented Nov 8, 2022

Same thing happening again with version 0.23.0 - this should be reopened

@p-maks
Copy link

p-maks commented Nov 8, 2022

None of the above options worked for me, was able to bring down to 50.13 Mb with options above. Ended up moving few packages under devDependencies and using 0.22.1 version worked for me. Also using memory configuration option did not work either

@danielroe
Copy link
Member

Let's track in #727

greatuber pushed a commit to greatuber/vercel-builder that referenced this issue Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants