GeezerVison is showing github.com — Create a flatter dependency tree · Issue #1590 · googleapis/google-cloud-node
Create a flatter dependency tree #1590DescriptionRelates to #1535
We recently received some feedback that our dependency tree is getting pretty large. Generally our advice has always been to either npm dedupe or upgrade to npm3, which does help a great deal. One thing I've noticed about deduping with npm2 is that we run into a lot of unavoidable conflicts around @google-cloud/common.
This leads me to believe that there are a few things we could probably do to create a flatter dependency tree. Here are a couple of ideas:
- Moving parts of
@google-cloud/common that don't change very often to a separate module. I'm mostly thinking of grpc related items. If common gets an unavoidable duplication error, then we might have multiple grpc installs, each of which contains roughly 4600 files.
- Be more aggressive about keeping
@google-cloud/common up to date in all packages. In this theory this would eliminate the unavoidable duplications we see.
Activitychanged the title [-]Create a smaller dependency tree[/-] [+]Create a flatter dependency tree[/+] on Sep 12, 2016stephenplusplus commented on Sep 12, 2016 callmehiphop commented on Sep 12, 2016 ContributorAuthor More actions That includes all files, package.json, .gitignore, markdown, etc. murgatroid99 commented on Sep 13, 2016 Yes, that sounds about right. That doesn't include most of the repository, but it does include the source files needed to build the module, including BoringSSL, which is about 1500 files.
That count also includes the dependencies, and node-pre-gyp (which we use to distribute precompiled binaries) has a surprisingly large dependency tree. micaww commented on Sep 13, 2016 I've also had issues with my containers not deploying on App Engine due to timeouts from npm install taking too long with google-cloud. Downgrading to gcloud works fine. I've had to switch to locally building the Docker image and uploading that way. stephenplusplus commented on Sep 13, 2016 micaww commented on Sep 13, 2016 @stephenplusplus thanks for the response. That was the issue. Unfortunately, deploying on App Engine using the runtime nodejs does not work because it installs an old npm/Node combination. I fixed this by creating my own Dockerfile deriving off of the Google base image and installing v5.10.1. stephenplusplus commented on Sep 26, 2016 We'll be releasing all of our sub-modules today, followed by the google-cloud umbrella package. Each sub-module will require the same version of grpc and, where applicable, google-gax. In general, we should try to use compatible version ranges across all of the sub-modules.
This should help improve the issues we've been seeing, however, it will still be required for users on npm < 3 to run npm dedupe to see the benefits.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|