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

[WIP] Misc: Use yarn workspaces to reduce disk usage #1177

Open
wants to merge 2 commits into
base: master
from
Open

Conversation

@ovr
Copy link
Member

@ovr ovr commented Oct 5, 2020

Hello!

@vasilev-alex Ask a great question:

If we install typescript locally for each package inside our monorepo, how much disk space we need?

32 * 50mb (typescript = 1.6 gb

In this PR I am going to check the ability to use workspaces from yarn. It's not working now, but we will see when Yarn release a bug fix for it.

Current usage:

 ovr@MBP-Dmitry-2  ~/projects/cube/cube.js   master ?  du -sh                                                                                                                  64 ↵
3,7G	.

vs

du -sh                                                                                    ✔  10.17.0 ⬢  11.26 Dur
1,6G	.

image

Awaiting: yarnpkg/yarn#7807

ovr added 2 commits Oct 5, 2020
@merceyz
Copy link

@merceyz merceyz commented Oct 12, 2020

I see you have nested lockfiles, that doesn't work with workspaces, you need to remove the inner yarn.lock files. You can also try using V2 as it has better support for workspaces using yarn set version 2 && yarn config nodeLinker node-modules, if you got questions you can get help on our Discord https://discord.com/invite/yarnpkg.

Note that if you really want to save disk space you should use PnP https://yarnpkg.com/features/pnp

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.