Skip to content

Commit 660c7d6

Browse files
docs: troubleshooting: explain npm dedupe
1 parent 069d827 commit 660c7d6

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docs/troubleshooting.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ Windows users may face this issue when using npm modules such as `google-cloud-n
1818
Reference Issue: [#1162](https://github.com/GoogleCloudPlatform/google-cloud-node/issues/1162)
1919

2020

21+
## Is the `google-cloud` module on npm *really* 800 MB?
22+
23+
Old versions of npm won't automatically run [dedupe](https://docs.npmjs.com/cli/dedupe) for you. This is a command which finds compatible ranges of dependencies between your dependencies, and removes them from disk. Since npm version 3, dedupe is run before downloading any dependencies, so no extra disk space or download time is wasted.
24+
25+
For example, on npm 3, `npm install google-cloud` results in a ~45MB download. With npm 2, you get the larger download size, upwards of 700 MB. If you run `npm dedupe` from the command line, you should end up around the npm 3 size.
26+
27+
For best results,
28+
29+
1. Upgrade npm to version 3.x
30+
1. If that's not possible, run `npm dedupe` after installing
31+
32+
Reference Issue: [#1535](https://github.com/GoogleCloudPlatform/google-cloud-node/issues/1535)
33+
Reference Tweet: [@mluggy's Tweet on 8/29/16](https://twitter.com/mluggy/status/770221258533380096)
34+
35+
2136
## My requests are returning errors instructing me to retry the request.
2237

2338
If you ever see an error like this, you might be pinging the API too rapidly, hitting a rate limit:

0 commit comments

Comments
 (0)