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

polymer-cli is huge and very slow to install #2583

Open
43081j opened this issue Apr 4, 2018 · 7 comments
Open

polymer-cli is huge and very slow to install #2583

43081j opened this issue Apr 4, 2018 · 7 comments

Comments

@43081j
Copy link
Contributor

43081j commented Apr 4, 2018

We currently have a build which runs on VSTS online (visual studio), it installs polymer-cli globally per build.

While this is inefficient and we should probably cache global deps across some builds, it doesn't excuse the fact that polymer-cli takes us 9 minutes to install.

Looking at the dependency tree, apparently (according to cost-of-modules util):

  • web-component-tester is 171M
  • polymer-build is 78M
  • polymer-analyzer is 22M

web-component-tester dependencies:

  • polymer-build is 101M

so is this dependency size pretty much because we have differing versions of our own repos across other repos? if all polymer-* projects had the same dependencies exactly, would we have one copy of each and the size would go down? (in this case you'd save 101M from WCT's second polymer-build)

on top of this, installing wct of course results in downloading the sauce binary, but that shouldn't be so slow as it is only ~6MB.

thoughts?

@web-devel
Copy link

web-devel commented Apr 5, 2018

Also since 1.6 there is npm-shrinkwrap which prevents package deduplication. We install polymer-cli as devDependency (cannot force users to install it globally and it's more reliable when you have to build lots of projects on the same machine i.e. on CI servers).
So there is a huge bump of installed dependencies (and node_modules size) after upgrading from 1.5 to 1.6. It's like ~900 → ~1500 deps.

Also yarn does not support npm-shrinkwrap.json so it doesn't make sense for yarn users

@Nehaw149
Copy link

Hi, is there any update?

@Kedar-K
Copy link

Kedar-K commented Aug 19, 2018

Hello, i have been trying to install polymer-cli since a hour and it is not installed yet. I used command sudo npm install -g polymer-cli
Is there any other way out to this?

@davidmaxwaterman
Copy link

I recommend using nvm to install node[1], and then not using sudo to install polymer-cli (ie just npm install -g polymer-cli).
hth.

[1] https://github.com/creationix/nvm

@Kedar-K
Copy link

Kedar-K commented Aug 25, 2018

Thanks @davidmaxwaterman It worked!

@nburn42
Copy link

nburn42 commented Aug 29, 2018

Installing polymer-cli today took over 30 minutes on my machine with a business internet connection.

There were not any errors in --verbose.
It initially quickly downloads a lot of packages then it just sits there for a few minutes on network before it pops to life to update one dependency.
This doesn't seem to be happening with other npm packages.

@aomarks aomarks transferred this issue from Polymer/polymer-cli Jan 3, 2019
@stale
Copy link

stale bot commented Mar 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 3, 2020
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

7 participants