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

14.0.4-canary.36 breaks build of turborepo on Vercel - Works up to 14.0.4-canary.35 #62425

Open
avitorio opened this issue Feb 23, 2024 · 5 comments
Labels
bug Issue was opened via the bug report template.

Comments

@avitorio
Copy link

Link to the code that reproduces this issue

https://github.com/avitorio/outstatic

To Reproduce

  1. Clone the monorepo above
  2. Set up the project on Vercel with the following settings:
Build command:     cd ../.. && pnpm turbo run build --scope=outstatic-dev-blog --include-dependencies --no-deps
Root directory:    apps/dev
CleanShot 2024-02-22 at 22 20 55@2x

Go to /apps/dev/package.json and set next: 14.0.4-canary.36

run pnpm install
Deploy it on vercel

You'll get:

Error: A Serverless Function has exceeded the unzipped maximum size of 250 MB. : https://vercel.link/serverless-function-size
21:48:24.910

Current vs. Expected behavior

Current: Build fails on Vercel when triggered via GitHub if next: ^14.0.4-canary.36 and above
Expected: Build completes on Vercel on next: ^14.0.4-canary.35

Provide environment information

Node: 18 on Vercel

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

Turbopack (--turbo)

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

Vercel (Deployed)

Additional context

I tested my reproduction against different canary releases, and the first one that introduced the bug was "14.0.4-canary.36", since reverting to "14.0.4-canary.35" works.

@avitorio avitorio added the bug Issue was opened via the bug report template. label Feb 23, 2024
@github-actions github-actions bot added the Turbopack Related to Turbopack with Next.js. label Feb 23, 2024
@ijjk
Copy link
Member

ijjk commented Feb 23, 2024

Hi, can you provide additional context, is a folder that's prefixed with . present in your project that includes large files?

@avitorio
Copy link
Author

Hi @ijjk

The .next folder ends up being huge.
Here's some more context. These are all the static assets:

Here are the logs when the build fails:

https://gist.github.com/avitorio/6c2b65e5d3a39032500063e4cb1ebf7b

And when I click on Redeploy on Vercel it works:

https://gist.github.com/avitorio/8be24b8945e2714c6a7dbe2dc3fa35b2

I don't get why clicking Redeploy makes the build work, but not when it is triggered on commit via GitHub.

Here are the static assets. Some people mentioned the big build was probably due to having too many static assets.

https://github.com/avitorio/outstatic/tree/canary/apps/dev/public/

My /public amounts to 4mb.

@avitorio
Copy link
Author

One thing that is also worth noting is that in the repo I have an examples folder (/apps/advanced-blog-example) with a next.js install that is basically identical to the /apps/dev folder. The only difference being that the /apps/dev install uses the outstatic: workspace:*, while the example uses outstatic: latest

The example deploys fine with next.js 14.0.4-canary.36 and above. Whereas the apps/dev install, which uses workspace:*

But the fact you mentioned the dot folder might be relevant since this has changed.

@kwonoj kwonoj removed the Turbopack Related to Turbopack with Next.js. label Feb 23, 2024
@ijjk
Copy link
Member

ijjk commented Feb 26, 2024

Hi, can you confirm you are properly ignoring the .next/cache folder in your turbo.json? Related config can be seen here https://turbo.build/repo/docs/core-concepts/caching/what-to-cache#exclusions

@avitorio
Copy link
Author

avitorio commented Feb 27, 2024

Hey, thanks for the suggestion, but even with that ignore rule 14.0.4-canary.36 still breaks my build :/

avitorio/outstatic#197

I've mentioned in my last comment that the "The example deploys fine with next.js 14.0.4-canary.36 and above. Whereas the apps/dev install, which uses workspace:*".

But I just realised that's not the case. It actually gives me the Error: A Serverless Function has exceeded the unzipped maximum size of 250 MB. : https://vercel.link/serverless-function-size above 14.04-canary.36 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

3 participants