Skip to content

Firestore includes two copies of grpc in node_modules which are both very large #96

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

Closed
lewchuk opened this issue Jan 4, 2018 · 4 comments
Assignees
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@lewchuk
Copy link

lewchuk commented Jan 4, 2018

The node_modules for a project containing only firestore as it's dependency are quite large (~150MB depending on exact OS/configuration). Most of this comes from the grpc dependency which is about 50MB and most unfortunately is included twice. Once at the top level node_modules/grpc and once within the node_modules for firestore ./node_modules/@google-cloud/firestore/node_modules/grpc.

Is there any way to only include grpc once when installed? Having this massive dependency makes deploying packages with firestore difficult where the size of the deployment package is constrained.

Environment details

  • OS: mac osx and linux (node 6.10.3 docker image)
  • Node.js version: 6.10
  • npm version: npm 3.10.10 and yarn 1.3.2
  • @google-cloud/firestore version: 0.10.0 and 0.10.1

Steps to reproduce

  1. Create a package.json file with a single dependency: "@google-cloud/firestore": "^0.10.1"
  2. Run yarn install --production or npm install --production
  3. run find . -name grpc and note the two copies of grpc.
@schmidt-sebastian
Copy link
Contributor

Thank you for reporting this. We will look at removing one of these dependencies.

@schmidt-sebastian schmidt-sebastian self-assigned this Jan 9, 2018
@schmidt-sebastian
Copy link
Contributor

schmidt-sebastian commented Jan 9, 2018

Note that this is due to the recent change we made to address GRPC connection issues. The work-around pegged our local GRPC version to 1.7.1. The latest 1.7.x GRPC version is however 1.7.3 - so you will see both included.

We have already relaxed the strict dependency on 1.7.1 in master, but have yet to release it (#92). I will prepare a release for this by the end of the week.

@lewchuk
Copy link
Author

lewchuk commented Jan 9, 2018

@schmidt-sebastian excellent news! I look forward to that release.

@schmidt-sebastian
Copy link
Contributor

v0.11.0 was just released and should be on NPM momentarily.

@google-cloud-label-sync google-cloud-label-sync bot added the api: firestore Issues related to the googleapis/nodejs-firestore API. label Jan 31, 2020
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants