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

Serverless Function Size grows between 14.2.16 -> 14.2.23 on Vercel #75635

Open
derjogi opened this issue Feb 4, 2025 · 2 comments
Open

Serverless Function Size grows between 14.2.16 -> 14.2.23 on Vercel #75635

derjogi opened this issue Feb 4, 2025 · 2 comments

Comments

@derjogi
Copy link

derjogi commented Feb 4, 2025

Link to the code that reproduces this issue

harmonicabot/harmonica-web-app@17757ce

To Reproduce

In a project using llamaindex and some other dependencies, when you change the next.js version from 14.2.16 to 14.2.23 and deploy it on Vercel, it will fail to build because it will be over the max function size of 250mb.
Note: building locally does not show any apparent differences; I suspect the next.js version might be wrongly including cache or other modules in the server function that should normally not be included.

Current vs. Expected behavior

Current behaviour: Server Function is above 250mb (~800mb in my case). Expected: It should only be ~13mb, which is what the contents of .next are without the .next/cache folder.

Provide environment information

Operating System: 
  [Not relevant, as it happens on vercel servers]
Binaries:
  Node: 23.6.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 9.15.3
Relevant Packages:
  next: 14.2.23 // An outdated version detected (latest is 15.1.6), upgrade is highly recommended!
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.6.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure, Instrumentation, Output, Package Managers, Webpack

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

No response

@github-actions github-actions bot added Instrumentation Related to Next.js Instrumentation. Output Related to the the output configuration option. Package Managers Related to package managers (npm, yarn, pnpm, bun). Webpack Related to Webpack with Next.js. labels Feb 4, 2025
@samcx samcx removed Output Related to the the output configuration option. Webpack Related to Webpack with Next.js. Instrumentation Related to Next.js Instrumentation. Package Managers Related to package managers (npm, yarn, pnpm, bun). labels Feb 4, 2025
@samcx
Copy link
Member

samcx commented Feb 4, 2025

@derjogi Not sure if this is related to Next.js or how we're bundling Functions on Vercel.

Can you share Deployment URLs between the two versions?

@derjogi
Copy link
Author

derjogi commented Feb 5, 2025

@samcx Not sure whether these work, they're preview URLs:

With next.js 14.2.16 (✅): https://harmonica-web-app-git-fix-build-harmonicas-projects.vercel.app/
With next.js 14.2.23 (❌): https://harmonica-web-app-git-fix-build-harmonicas-projects.vercel.app/

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

2 participants