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

Yarn version berry's cache folder is increasing slug size #1117

Open
sbecka opened this issue Jun 28, 2023 · 0 comments
Open

Yarn version berry's cache folder is increasing slug size #1117

sbecka opened this issue Jun 28, 2023 · 0 comments

Comments

@sbecka
Copy link

sbecka commented Jun 28, 2023

Is your enhancement request related to a problem? Please describe.
Our app just migrated from Yarn version 1 to version 3 (berry), and the slug size for our staging app increased from ~204MB to ~336MB hitting Heroku's soft limit of 300MB. We saw that the .yarn/cache folder was 158MB and included in the slug. Our production app is still on Yarn version 1 and it does not have the .yarn/cache folder in its slug.

Describe the solution you'd like
Is there a way to prevent the .yarn/cache folder from being included in the slug?

Describe alternatives you've considered
We opened a support ticket in Heroku. We tried adding .yarn/cache to our .slugignore file but this didn't work because the slugignore step happens before any yarn commands are run in the build logs. We were unable to resolve this.

Additional context
Our app uses React and Ruby on Rails. We are also not using Yarn's new Plug 'n' Play feature and still use node_modules.
Yarn version 3.6. Node version 16.20.0

Screenshots of file sizes from our staging w/Yarn v3 and production w/Yarn v1:
Screenshot 2023-06-28 at 5 17 37 PM
Screenshot 2023-06-28 at 5 18 01 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant