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

Exceeds maximum size limit of 50mb #727

Closed
phadaphunk opened this issue Oct 24, 2022 · 21 comments
Closed

Exceeds maximum size limit of 50mb #727

phadaphunk opened this issue Oct 24, 2022 · 21 comments

Comments

@phadaphunk
Copy link

Hi,

Since the latest release (0.23), all deployments are failing with the following message :

image

I rolled back to 0.22.1 and the deployment never goes over 49.99 mb.

Was this limit handled before and this change is expected?

@kmukku
Copy link

kmukku commented Oct 27, 2022

How did you fixed this @phadaphunk ? I'm having constantly same issues with nuxt2.

@phadaphunk
Copy link
Author

@kmukku Didn't really, we switched SSR to false and moved a lot of packages to devDependencies to save space. We might have to move at some point due to the size, but at the moment we still have space to save with other dependencies.

@kmukku
Copy link

kmukku commented Oct 27, 2022

I was able to make it work with nuxt2 again by locking to version 0.22.1. Hope it will work for you too.

vercel.json

{
    "version": 2,
    "builds": [
        {
            "src": "nuxt.config.js",
            "use": "@nuxtjs/[email protected]"
        }
    ]
}

@phadaphunk
Copy link
Author

@kmukku Thanks for the tip! We did try that, and it did reduce the package size a bit, but we were still a little bit over 😢 It is good to note that the new version does increase the size a bit 👀

@Naybnet
Copy link

Naybnet commented Oct 28, 2022

In SSR mode I also had to rollback to 0.22.1 since the index function went up to 110MB.

@phadaphunk phadaphunk reopened this Oct 31, 2022
@phadaphunk
Copy link
Author

Actually, this is still relevant.

@lucasfischer
Copy link

Experiencing the same issue since October 28th. Rolling back to 0.22.1 fixes this issue for our project as well.

@azpery
Copy link

azpery commented Nov 3, 2022

Hello everybody,

I am facing the same issue today while updating my packages. I'm rolling back to 0.22.1 thanks to @kmukku

went from 18Mb to 156 Mb x)

Bye

@MurmeltierS
Copy link

similar problem here

@leerob
Copy link

leerob commented Nov 11, 2022

Hey folks, thanks for flagging. We'll work with the team on this 👍

@danielroe
Copy link
Member

danielroe commented Nov 11, 2022

The issue is the latest version of npm, which has a bug with installing dependencies in a symlink. Previously we pinned to an older version of the vercel build tools and raised the issue. See #636 for a description of the problem.

Current workarounds are:

  • using yarn
  • pinning to an old version of this builder

@clamarque
Copy link

Hey, any news on this project? I'm still stuck on the deployment of my project :(

@danielroe
Copy link
Member

danielroe commented Jan 6, 2023

This should be resolved in the latest version of this builder via #636

@codeofsumit
Copy link

This problem still persists for me.
I have the latest release.

Pinning the version to an older version doesn't work either because it apparently requires vercel to use node 14 (but our codebase and vercel project is on node 16).

Any help is appreciated

@leerob
Copy link

leerob commented Jan 18, 2023

Hey @codeofsumit, you can still use Node.js 14 on Vercel.

@danielroe
Copy link
Member

Sorry to hear you're still experiencing this. Would you open a new issue with a reproduction, so I can look into it? 🙏

@codeofsumit
Copy link

@danielroe I have created a reproduction repo.
I tried to get closer and closer to our web app setup including package versions, node version, etc.

While I haven't been able to get the exact error (yet), I still get an error and I'm stuck now.

Repo:
https://github.com/tresorone/temp-web-app-repro

Error

✖ Nuxt Fatal Error                                                         ││                                                                              ││   Error:                                                                     ││                                                                              ││   Vue packages version mismatch:                                             ││                                                                              ││   - [email protected]                                                               ││   - [email protected]                                               ││                                                                              ││   This may cause things to work incorrectly. Make sure to use the same       ││   version for                                                                ││   both.                                                                      ││                                                                              ││                                                             

Vercel Project Settings:
image
image

@danielroe
Copy link
Member

danielroe commented Jan 19, 2023

(Reopening to track in case this is a regression.)

@codeofsumit The issue is that you have a mismatch in your Vue versions (2.6 vs 2.7). I'm happy to push a fix to your package.json if you share access to the repo with me.

@danielroe danielroe reopened this Jan 19, 2023
@codeofsumit
Copy link

@danielroe done. After your fix, I will continue to attempt deployment and will report back.

@codeofsumit
Copy link

@danielroe thanks for the fix. Now we have the issue we were looking for:

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

@danielroe
Copy link
Member

@codeofsumit Having checked your project and its build output, it doesn't seem like this isa bug with the builder or a regression of the linked issue here. (Just to confirm - you never used the builder successfully, right?)

Rather, your app is just too big when processed with this bundler. You should move many of your dependencies to devDependencies because they are not needed once your app is built. For example, nuxt (which depends on webpack) should be in your devDependencies, as well as any buildModules.

I would highly recommend that if you are using Nuxt 2 you consider Nuxt Bridge, which offers a much smaller output size and handles a lot of these issues.

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

10 participants