question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GCS - NPM dependencies

See original GitHub issue

Using GCS in Google Cloud Functions, the number of dependencies matters hugely in order to improve cold starts. I use GCS for one short upload (logging) and it seems like it is hurting my cold start times as it has over a hundred dependencies in total.

+ @google-cloud/storage@1.7.0
added 106 packages from 121 contributors in 7.289s

Are you folks caching your own packages for faster loading or not really?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
JustinBeckwithcommented, Jun 1, 2018

This is something we’re actively looking to fix. Most of those dependencies come in with request, so removing that is somewhat delicate work. We are actively working towards it though πŸ˜ƒ

0reactions
JustinBeckwithcommented, Mar 7, 2019

This was fixed in #619 πŸ˜ƒ On master as of now:

@google-cloud/storage@2.4.2 /Users/beckwith/Code/nodejs-storage
β”œβ”€β”¬ @google-cloud/common@0.31.0
β”‚ β”œβ”€β”€ @google-cloud/projectify@0.3.2
β”‚ β”œβ”€β”€ @google-cloud/promisify@0.3.1
β”‚ β”œβ”€β”¬ @types/duplexify@3.6.0
β”‚ β”‚ └── @types/node@11.10.5
β”‚ β”œβ”€β”¬ @types/request@2.48.1
β”‚ β”‚ β”œβ”€β”€ @types/caseless@0.12.1
β”‚ β”‚ β”œβ”€β”¬ @types/form-data@2.2.1
β”‚ β”‚ β”‚ └── @types/node@11.10.5 deduped
β”‚ β”‚ β”œβ”€β”€ @types/node@11.10.5 deduped
β”‚ β”‚ └── @types/tough-cookie@2.3.5
β”‚ β”œβ”€β”€ arrify@1.0.1 deduped
β”‚ β”œβ”€β”€ duplexify@3.7.1 deduped
β”‚ β”œβ”€β”€ ent@2.2.0
β”‚ β”œβ”€β”€ extend@3.0.2 deduped
β”‚ β”œβ”€β”¬ google-auth-library@3.1.0
β”‚ β”‚ β”œβ”€β”€ base64-js@1.3.0
β”‚ β”‚ β”œβ”€β”€ fast-text-encoding@1.0.0
β”‚ β”‚ β”œβ”€β”€ gaxios@1.8.1 deduped
β”‚ β”‚ β”œβ”€β”¬ gcp-metadata@0.9.3
β”‚ β”‚ β”‚ β”œβ”€β”€ gaxios@1.8.1 deduped
β”‚ β”‚ β”‚ └─┬ json-bigint@0.3.0
β”‚ β”‚ β”‚   └── bignumber.js@7.2.1
β”‚ β”‚ β”œβ”€β”¬ gtoken@2.3.2
β”‚ β”‚ β”‚ β”œβ”€β”€ gaxios@1.8.1 deduped
β”‚ β”‚ β”‚ β”œβ”€β”¬ google-p12-pem@1.0.3
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ node-forge@0.7.6
β”‚ β”‚ β”‚ β”‚ └── pify@4.0.1 deduped
β”‚ β”‚ β”‚ β”œβ”€β”€ jws@3.2.1 deduped
β”‚ β”‚ β”‚ β”œβ”€β”€ mime@2.4.0 deduped
β”‚ β”‚ β”‚ └── pify@4.0.1 deduped
β”‚ β”‚ β”œβ”€β”€ https-proxy-agent@2.2.1 deduped
β”‚ β”‚ β”œβ”€β”¬ jws@3.2.1
β”‚ β”‚ β”‚ β”œβ”€β”¬ jwa@1.4.0
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ buffer-equal-constant-time@1.0.1
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ ecdsa-sig-formatter@1.0.11
β”‚ β”‚ β”‚ β”‚ β”‚ └── safe-buffer@5.1.2 deduped
β”‚ β”‚ β”‚ β”‚ └── safe-buffer@5.1.2 deduped
β”‚ β”‚ β”‚ └── safe-buffer@5.1.2 deduped
β”‚ β”‚ β”œβ”€β”¬ lru-cache@5.1.1
β”‚ β”‚ β”‚ └── yallist@3.0.3
β”‚ β”‚ └── semver@5.6.0
β”‚ β”œβ”€β”€ pify@4.0.1
β”‚ └─┬ retry-request@4.0.0
β”‚   └─┬ through2@2.0.5
β”‚     β”œβ”€β”€ readable-stream@2.3.6 deduped
β”‚     └── xtend@4.0.1 deduped
β”œβ”€β”¬ @google-cloud/paginator@0.1.2
β”‚ β”œβ”€β”€ arrify@1.0.1 deduped
β”‚ β”œβ”€β”€ extend@3.0.2 deduped
β”‚ β”œβ”€β”€ is@3.3.0
β”‚ β”œβ”€β”¬ split-array-stream@2.0.0
β”‚ β”‚ └── is-stream-ended@0.1.4
β”‚ └── stream-events@1.0.5 deduped
β”œβ”€β”€ @google-cloud/promisify@0.4.0
β”œβ”€β”€ arrify@1.0.1
β”œβ”€β”¬ async@2.6.2
β”‚ └── lodash@4.17.11
β”œβ”€β”¬ compressible@2.0.16
β”‚ └── mime-db@1.38.0
β”œβ”€β”¬ concat-stream@2.0.0
β”‚ β”œβ”€β”€ buffer-from@1.1.1
β”‚ β”œβ”€β”€ inherits@2.0.3
β”‚ β”œβ”€β”¬ readable-stream@3.2.0
β”‚ β”‚ β”œβ”€β”€ inherits@2.0.3 deduped
β”‚ β”‚ β”œβ”€β”¬ string_decoder@1.1.1
β”‚ β”‚ β”‚ └── safe-buffer@5.1.2 deduped
β”‚ β”‚ └── util-deprecate@1.0.2
β”‚ └── typedarray@0.0.6
β”œβ”€β”¬ duplexify@3.7.1
β”‚ β”œβ”€β”¬ end-of-stream@1.4.1
β”‚ β”‚ └── once@1.4.0 deduped
β”‚ β”œβ”€β”€ inherits@2.0.3 deduped
β”‚ β”œβ”€β”¬ readable-stream@2.3.6
β”‚ β”‚ β”œβ”€β”€ core-util-is@1.0.2
β”‚ β”‚ β”œβ”€β”€ inherits@2.0.3 deduped
β”‚ β”‚ β”œβ”€β”€ isarray@1.0.0
β”‚ β”‚ β”œβ”€β”€ process-nextick-args@2.0.0
β”‚ β”‚ β”œβ”€β”€ safe-buffer@5.1.2
β”‚ β”‚ β”œβ”€β”€ string_decoder@1.1.1 deduped
β”‚ β”‚ └── util-deprecate@1.0.2 deduped
β”‚ └── stream-shift@1.0.0
β”œβ”€β”€ extend@3.0.2
β”œβ”€β”¬ gcs-resumable-upload@1.0.0
β”‚ β”œβ”€β”¬ abort-controller@2.0.2
β”‚ β”‚ └── event-target-shim@5.0.1
β”‚ β”œβ”€β”¬ configstore@4.0.0
β”‚ β”‚ β”œβ”€β”¬ dot-prop@4.2.0
β”‚ β”‚ β”‚ └── is-obj@1.0.1
β”‚ β”‚ β”œβ”€β”€ graceful-fs@4.1.15
β”‚ β”‚ β”œβ”€β”¬ make-dir@1.3.0
β”‚ β”‚ β”‚ └── pify@3.0.0
β”‚ β”‚ β”œβ”€β”¬ unique-string@1.0.0
β”‚ β”‚ β”‚ └── crypto-random-string@1.0.0
β”‚ β”‚ β”œβ”€β”¬ write-file-atomic@2.4.2
β”‚ β”‚ β”‚ β”œβ”€β”€ graceful-fs@4.1.15 deduped
β”‚ β”‚ β”‚ β”œβ”€β”€ imurmurhash@0.1.4
β”‚ β”‚ β”‚ └── signal-exit@3.0.2
β”‚ β”‚ └── xdg-basedir@3.0.0 deduped
β”‚ β”œβ”€β”¬ gaxios@1.8.1
β”‚ β”‚ β”œβ”€β”€ abort-controller@2.0.2 deduped
β”‚ β”‚ β”œβ”€β”€ extend@3.0.2 deduped
β”‚ β”‚ β”œβ”€β”€ https-proxy-agent@2.2.1 deduped
β”‚ β”‚ └── node-fetch@2.3.0 deduped
β”‚ β”œβ”€β”€ google-auth-library@3.1.0 deduped
β”‚ β”œβ”€β”€ pumpify@1.5.1 deduped
β”‚ └── stream-events@1.0.5 deduped
β”œβ”€β”¬ hash-stream-validation@0.2.1
β”‚ └─┬ through2@2.0.5
β”‚   β”œβ”€β”€ readable-stream@2.3.6 deduped
β”‚   └── xtend@4.0.1
β”œβ”€β”€ mime@2.4.0
β”œβ”€β”¬ mime-types@2.1.22
β”‚ └── mime-db@1.38.0 deduped
β”œβ”€β”¬ once@1.4.0
β”‚ └── wrappy@1.0.2
β”œβ”€β”¬ pumpify@1.5.1
β”‚ β”œβ”€β”€ duplexify@3.7.1 deduped
β”‚ β”œβ”€β”€ inherits@2.0.3 deduped
β”‚ └─┬ pump@2.0.1
β”‚   β”œβ”€β”€ end-of-stream@1.4.1 deduped
β”‚   └── once@1.4.0 deduped
β”œβ”€β”€ snakeize@0.1.0
β”œβ”€β”¬ stream-events@1.0.5
β”‚ └── stubs@3.0.0
β”œβ”€β”¬ teeny-request@3.11.3
β”‚ β”œβ”€β”¬ https-proxy-agent@2.2.1
β”‚ β”‚ β”œβ”€β”¬ agent-base@4.2.1
β”‚ β”‚ β”‚ └─┬ es6-promisify@5.0.0
β”‚ β”‚ β”‚   └── es6-promise@4.2.6
β”‚ β”‚ └─┬ debug@3.2.6
β”‚ β”‚   └── ms@2.1.1
β”‚ β”œβ”€β”€ node-fetch@2.3.0
β”‚ └── uuid@3.3.2
β”œβ”€β”¬ through2@3.0.1
β”‚ └── readable-stream@2.3.6 deduped
└── xdg-basedir@3.0.0
Read more comments on GitHub >

github_iconTop Results From Across the Web

@google-cloud/storage - npm
Dependencies cannot be kept up-to-date. Client libraries targeting some end-of-life versions of Node.js are available, and can be installedΒ ...
Read more >
Manage Node.js packages - Artifact Registry - Google Cloud
When you specify a package as a dependency in package.json , ensure that you include the scope for the repository. The following example...
Read more >
webpack-gcs-plugin - npm Package Health Analysis - Snyk
All security vulnerabilities belong to production dependencies of direct and indirect packages. License: MIT. Security Policy: No. We foundΒ ...
Read more >
CHANGELOG.md - googleapis/nodejs-storage - GitHub
This patch release fixed an issue affecting reading from a file on GCS (#528). Dependencies. fix(dep): upgrade teeny-request to v3.11.3 (#529); fix(deps):Β ...
Read more >
Caching dependencies with Google Cloud Build and GCS
Caching dependencies with Google Cloud Build and GCS ... restore our gradle and npm dependencies ( $HOME/.gradle and $HOME/.npm ) into GCS,Β ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found