google-cloud-node: Error node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/ ?

This seems to occur with Node V10+

This issue is identical but it involves every single @google/* package: https://github.com/GoogleCloudPlatform/google-cloud-node/issues/2826

Environment details

  • OS: OSX
  • Node.js version: v10.2.0
  • npm version: 5.6.0
  • google-cloud-node version:
    "@google-cloud/logging": "1.2.0",
    "@google-cloud/storage": "1.7.0",
    "@google-cloud/trace-agent": "2.10.1",

Steps to reproduce

npm install any of these:

    "@google-cloud/logging": "1.2.0",
    "@google-cloud/storage": "1.7.0",
    "@google-cloud/trace-agent": "2.10.1",

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 21 (2 by maintainers)

Most upvoted comments

@crwilcox thanks for looking into this, apologies for the late reply. I was able to solve this earlier in the day by bumping all of these package versions:

 "@google-cloud/logging": "1.2.0",
    "@google-cloud/storage": "1.7.0",
    "@google-cloud/trace-agent": "2.10.1",

Steps to fix this for anyone else reading:

  1. rm -rf node_modules
  2. rm yarn.lock
  3. yarn

Obvs use the alternative with npm if you’re going to use npm.

Make sure the package versions are fixed and they are the ones listed above.

Running this successfully with Node.js v10.2.0

I had similar issue with Node v10, changing node to the stable version works for me.

@thebly86 go through your package.json and eliminate all that you don’t use first, then remove your node_modules/ and package-lock.json and finally run npm update in your project directory. I tried everything mentioned above but it turned out it was just a matter of updating my modules

I can’t reproduce your failures for any package. I can make this fail installing google-cloud as is stated in #2826.

The root of the issue seems to be npm install grpc@1.7.3 (which occurs as a dependency of npm install @google-cloud/firestore@^0.8.0 which is a dependency of npm install google-cloud@0.57.0. That version of grpc, which is a bit old, doesn’t have a binary prebuilt. The current version, grpc@1.13.0-pre1 installs without issue.

@oshalygin, Can you confirm that with a blank directory you are unable to install of @google-cloud/logging? If not, I am going to scope this back to just installation issues with google-cloud as it seems its install of firestore

Output of installing GRPC v1.7.3

crwilcox@crwilcox:~/test-gyp-firestore$ npm install grpc@1.7.3

> grpc@1.7.3 install /usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v64-linux-x64-glibc.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.7.3 and node@10.2.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v64-linux-x64-glibc.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.7.3 and node@10.2.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/build'
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
make: Entering directory '/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/build'
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack_builder.o
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack_builder.o
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/connected_channel.o
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/connected_channel.o
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker.o
sed: can't read ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/channel/connected_channel.o.d.raw: No such file or directory
rm: cannot remove './Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/channel/connected_channel.o.d.raw': No such file or directory
grpc.target.mk:399: recipe for target 'Release/obj.target/grpc/deps/grpc/src/core/lib/channel/connected_channel.o' failed
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/channel/connected_channel.o] Error 1
make: Leaving directory '/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/google/home/crwilcox/.nvm/versions/node/v10.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.9.0-6-amd64
gyp ERR! command "/usr/local/google/home/crwilcox/.nvm/versions/node/v10.2.0/bin/node" "/usr/local/google/home/crwilcox/.nvm/versions/node/v10.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc"
gyp ERR! cwd /usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc
gyp ERR! node -v v10.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/google/home/crwilcox/.nvm/versions/node/v10.2.0/bin/node /usr/local/google/home/crwilcox/.nvm/versions/node/v10.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Linux 4.9.0-6-amd64
node-pre-gyp ERR! command "/usr/local/google/home/crwilcox/.nvm/versions/node/v10.2.0/bin/node" "/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc
node-pre-gyp ERR! node -v v10.2.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/google/home/crwilcox/.nvm/versions/node/v10.2.0/bin/node /usr/local/google/home/crwilcox/.nvm/versions/node/v10.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc' (1)
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker_factory.ol script
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker_registry.o script
In file included from ../deps/grpc/src/core/lib/iomgr/closure.h:26:0,
                 from ../deps/grpc/src/core/lib/channel/handshaker.h:24,
                 from ../deps/grpc/src/core/lib/channel/handshaker_factory.h:24,
                 from ../deps/grpc/src/core/lib/channel/handshaker_registry.h:24,
                 from ../deps/grpc/src/core/lib/channel/handshaker_registry.c:19:
../deps/grpc/src/core/lib/iomgr/error.h:26:10: fatal error: grpc/status.h: No such file or directory
 #include <grpc/status.h>
          ^~~~~~~~~~~~~~~
compilation terminated.
grpc.target.mk:399: recipe for target 'Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker_registry.o' failed
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker_registry.o] Error 1
make: Leaving directory '/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/google/home/crwilcox/.nvm/versions/node/v10.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.9.0-6-amd64
gyp ERR! command "/usr/local/google/home/crwilcox/.nvm/versions/node/v10.2.0/bin/node" "/usr/local/google/home/crwilcox/.nvm/versions/node/v10.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc"
gyp ERR! cwd /usr/local/google/home/crwilcox/test-gyp-firestore/node_modules/grpc
gyp ERR! node -v v10.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/usr/local/google/home/crwilcox/test-gyp-firestore/package.json'
npm WARN test-gyp-firestore No description
npm WARN test-gyp-firestore No repository field.
npm WARN test-gyp-firestore No README data
npm WARN test-gyp-firestore No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.7.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.7.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /usr/local/google/home/crwilcox/.npm/_logs/2018-06-21T17_36_18_091Z-debug.log

I can confirm that changing the versions solved it for me. In my case:

"@google-cloud/datastore": "1.4.x",
"@google-cloud/nodejs-repo-tools": "2.3.x"