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 add package is taking a long time ~12-15mins #1074

Open
pchakravarthy opened this issue May 3, 2019 · 7 comments
Open

yarn add package is taking a long time ~12-15mins #1074

pchakravarthy opened this issue May 3, 2019 · 7 comments

Comments

@pchakravarthy
Copy link

pchakravarthy commented May 3, 2019

Describe the bug
yarn add package is taking a long time ~12-15mins

To Reproduce
Steps to reproduce the behavior:

  1. 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

@larixer
Copy link
Member

larixer commented May 4, 2019

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.

@pchakravarthy
Copy link
Author

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.

@larixer
Copy link
Member

larixer commented May 5, 2019

@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.

@larixer
Copy link
Member

larixer commented May 8, 2019

@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?

@larixer
Copy link
Member

larixer commented May 8, 2019

@pchakravarthy I have pushed some optimizations targeted at Docker on Mac into master branch. Could you check whether it improves things for you?

@pchakravarthy
Copy link
Author

@Vlasenko thank you for the quick response, will check this out.

@yugkhokhar
Copy link

You can try using pnpm as per your need for speed and optimization

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

No branches or pull requests

3 participants