Grpc-node: Install fails in node node-v13.1.0

Created on 16 Nov 2019  Â·  3Comments  Â·  Source: grpc/grpc-node

Problem description

I have updated node to node-v13.1.0 today & ran npm install in a project which uses firebase.
npm install failed.

npm log

 CC(target) Release/obj.target/address_sorting/deps/grpc/third_party/address_sorting/address_sorting.o
  CC(target) Release/obj.target/address_sorting/deps/grpc/third_party/address_sorting/address_sorting_posix.o
  CC(target) Release/obj.target/address_sorting/deps/grpc/third_party/address_sorting/address_sorting_windows.o
  AR(target) Release/obj.target/libaddress_sorting.a
  COPY Release/libaddress_sorting.a
  CXX(target) Release/obj.target/grpc_node/ext/byte_buffer.o
  CXX(target) Release/obj.target/grpc_node/ext/call.o
../ext/call.cc: In function ‘bool grpc::node::CreateMetadataArray(v8::Local<v8::Object>, grpc_metadata_array*)’:
../ext/call.cc:104:58: error: no matching function for call to ‘v8::Array::Get(unsigned int&)’
     Local<String> current_key(Nan::To<String>(keys->Get(i)).ToLocalChecked());
                                                          ^
In file included from /home/user-name/.cache/node-gyp/13.0.1/include/node/node.h:63,
                 from ../ext/call.cc:23:
/home/user-name/.cache/node-gyp/13.0.1/include/node/v8.h:3463:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/user-name/.cache/node-gyp/13.0.1/include/node/v8.h:3463:43: note:   candidate expects 2 arguments, 1 provided
/home/user-name/.cache/node-gyp/13.0.1/include/node/v8.h:3466:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/user-name/.cache/node-gyp/13.0.1/include/node/v8.h:3466:43: note:   candidate expects 2 arguments, 1 provided
../ext/call.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE grpc::node::Call::StartBatch(Nan::NAN_METHOD_ARGS_TYPE)’:
../ext/call.cc:681:35: error: no matching function for call to ‘v8::Object::Get(uint32_t&)’
     if (!op->ParseOp(obj->Get(type), &ops[i])) {
                                   ^
In file included from /home/user-name/.cache/node-gyp/13.0.1/include/node/node.h:63,
                 from ../ext/call.cc:23:
/home/user-name/.cache/node-gyp/13.0.1/include/node/v8.h:3463:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/user-name/.cache/node-gyp/13.0.1/include/node/v8.h:3463:43: note:   candidate expects 2 arguments, 1 provided
/home/user-name/.cache/node-gyp/13.0.1/include/node/v8.h:3466:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/user-name/.cache/node-gyp/13.0.1/include/node/v8.h:3466:43: note:   candidate expects 2 arguments, 1 provided
make: *** [grpc_node.target.mk:194: Release/obj.target/grpc_node/ext/call.o] Error 1
make: Leaving directory '/home/user-name/workspace/project/node_modules/grpc/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/user-name/path/to/node-v13.0.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 5.0.0-29-generic
gyp ERR! command "/home/user-name/path/to/node-v13.0.1-linux-x64/bin/node" "/home/user-name/path/to/node-v13.0.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/user-name/workspace/project/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/user-name/workspace/project/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v79"
gyp ERR! cwd /home/user-name/workspace/project/node_modules/grpc
gyp ERR! node -v v13.0.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/home/user-name/path/to/node-v13.0.1-linux-x64/bin/node /home/user-name/path/to/node-v13.0.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/user-name/workspace/project/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/user-name/workspace/project/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/user-name/workspace/project/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1028:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Linux 5.0.0-29-generic
node-pre-gyp ERR! command "/home/user-name/path/to/node-v13.0.1-linux-x64/bin/node" "/home/user-name/workspace/project/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /home/user-name/workspace/project/node_modules/grpc
node-pre-gyp ERR! node -v v13.0.1
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok 
Failed to execute '/home/user-name/path/to/node-v13.0.1-linux-x64/bin/node /home/user-name/path/to/node-v13.0.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/user-name/workspace/project/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/user-name/workspace/project/node_modules/grpc/src/node/extension_binary/node-v79-linux-x64-glibc --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
npm WARN @typescript-eslint/[email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/[email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/[email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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!     /home/user-name/.npm/_logs/2019-11-16T04_21_35_642Z-debug.log

Environment

  • OS name, version and architecture: Ubuntu
  • Node version [e.g. 8.10.0]: 13.1.0, 13.0.1
  • Node installation method: Manual binary
  • If applicable, compiler version [e.g. clang 3.8.0-2ubuntu4]
  • Package name and version [e.g. [email protected]]: latest

Most helpful comment

updating firebase didn't work for me. But uninstalling firebase, and then reinstalling firebase did.
NPM FTW. (sarcasm)

All 3 comments

You have grpc version 1.22.2. This bug was fixed in grpc 1.24.2. This is likely the result of how Firebase specifies their dependencies, so I suggest filing an issue against that library.

Updating firebase verion worked for me

updating firebase didn't work for me. But uninstalling firebase, and then reinstalling firebase did.
NPM FTW. (sarcasm)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yanbou893 picture yanbou893  Â·  5Comments

keyvhinng picture keyvhinng  Â·  5Comments

Slapbox picture Slapbox  Â·  5Comments

fenos picture fenos  Â·  4Comments

respinha picture respinha  Â·  6Comments