yarn install weight is extraordinary
drewlustro opened this issue · 3 comments
Hello!
I want to first thank you for building this custom theme. I've been struggling with docz customization a lot lately, and this is a super helpful reference.
Slow install
When I try to use this theme, yarn install
takes quite a while.
I needed to expand my node 10 heap size to 8GB just to get the command to execute. It required 20 minutes (!) on my Mac Pro with 96GB ram, 16 core Xeon.
Do you happen to know what is causing this exec time/weight?
Does it have something to do with yarn workspaces (which I'm not familiar with; I'm on yarn@1.21.x
)?
Extraneous dependencies
I looked at the dependencies in docz-theme-extended/theme.package.json
and there looks like there's a number of superfluous dependencies:
babel
-devDependencies
eslint
-devDependencies
prettier
-devDependencies
lint-staged
-devDependencies
husky
- devDependencytypescript
- an entire copy of TypeScript hrm... perhaps it could be inpeerDependencies
?
Thanks again!
Hi. Happy to hear that it is useful. I am using it in a bunch of my projects.
Regarding the issue. I am running this on a way slower machine without a problem so it is probably a very specific case. I will look into it if I something can be done and check other gatsby repos with similar issue.
I am working with yarn v1.22.4
.
Yarn workspaces is similar to lerna. Short explanation: it just handles dependencies in a monorepo so they are easy to install and not duplicated across packages.
So regarding devDeps. This is similar to create-react-app where most if not all are part of dependencies because when making a production build these wont be included. For dev. you will need to install them anyway. The base theme of docz does the same.
But it is possible that it is causing issues. Try removing node_modules
, move some deps to devDeps and run yarn install
from root again.
Kind sir, thank you for the help!
I was able to install your theme crudely by simple copy & paste. I must say, this work is well done and rather admirable.
I will continue to follow this repo – subscribed for updates :)
Happy to hear that you found a way around it and thanks.
If you have any feature requests/ideas let me know.
Cheers