yarn add package is taking a long time ~12-15mins
Describe the bug yarn add package is taking a long time ~12-15mins
To Reproduce Steps to reproduce the behavior:
- yarn add @babel/preset-flow @babel/cli is taking around ~18 mins to complete
Expected behavior Typically it should only take < 1 min to install this package. I suspect something is causing a delay. Does it install a fresh copy of all the packages?
This slows down development cycle as everytime we have a new package we wait for 20mins to start working
Screenshots N/A
Desktop (please complete the following information): N/A
Smartphone (please complete the following information): N/A
Additional context
cd packages'common
yarn add @babel/preset-flow @babel/cli
info Direct dependencies
info All dependencies
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ [email protected]
└─ [email protected]
Done in 16.09s.
It has to do with your environment.
Thank you @vlasenko for the quick response. I was trying to add these in the root folder as I was assuming that these are required by the project root.
@pchakravarthy It doesn't matter, it is very quick too:
yarn add -WD @babel/preset-flow @babel/cli
info Direct dependencies
├─ @babel/[email protected]
└─ @babel/[email protected]
info All dependencies
├─ @babel/[email protected]
└─ @babel/[email protected]
$ opencollective postinstall
*** Thank you for using apollo-universal-starter-kit! ***
Please consider donating to our open collective
to help us maintain this package.
https://opencollective.com/apollo-universal-starter-kit/donate
***
Done in 13.10s.
@pchakravarthy Hey Chakri! I've checked running docker on Mac, and I see some yarn performance degradation compared to running yarn on a Host, though not so great that you see:
/usr/src/app $ yarn add -WD @babel/cli
yarn add v1.3.2
Done in 135.15s.
I will ask in yarn support channel about this. Meanwhile could you make sure you use latest docker version?
@pchakravarthy I have pushed some optimizations targeted at Docker on Mac into master branch. Could you check whether it improves things for you?
@vlasenko thank you for the quick response, will check this out.
You can try using pnpm as per your need for speed and optimization