grpc-node: Fails to build with node.js v12.0.0 release

Problem description

../ext/channel.cc:292:56: error: too few arguments to function call, expected 2, have 1
  int try_to_connect = (int)info[0]->Equals(Nan::True());
                            ~~~~~~~~~~~~~~~            ^
/Users/mdouglass/.node-gyp/12.0.0/include/node/v8.h:2572:3: note: 'Equals' declared here
  V8_WARN_UNUSED_RESULT Maybe<bool> Equals(Local<Context> context,
  ^
/Users/mdouglass/.node-gyp/12.0.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))

Reproduction steps

npm init
npm install grpc@latest

Environment

  • macOS 10.14.4
  • node.js v12.0.0 installed via macOS installer from nodejs.org
  • gRPC 1.20.0

Additional context

Attached log files 2019-04-23T22_09_12_791Z-debug.log console.log

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 42
  • Comments: 33 (13 by maintainers)

Commits related to this issue

Most upvoted comments

npm ERR! grpc@1.20.0 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.20.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I’m trying to use ( npm install ) to install a project node_modules node -v = v12.4.0 npm -v = 6.9.0 angular 8

FYI this is used in FireBase and they still ship the old version that does not work w/ Node v12. I use FireBase and that is why I’m here. Now I’m monkey patching package.json to replace what FireBase ships.

What is the process to upgrade gprc?

npm install grpc@1.20.2 should work.

version 1.20.2 is now out.

Same issue on Ubuntu 19.04, node 12.0.0 installed with nvm, grpc 1.18.0.

You are using a version of the grpc library that does not support Node 12. Please use either a newer version of grpc or an older version of Node.

grpc@1.20.1 is now out with Node 12 support.

Same issue. Had to upgrade to “grpc”: “^1.20.2”.

does it work for yarn? I am having an issue upgrading or installing the new release but i am not sure if the issue is with grpc or other dependencies.

i just downgrade node (10.9.0), and fixed for now.

I would love to - but I don’t know how/where. I went on their website and filed a comment and sent a message to their group. The stack trace shows that the version they released TODAY is using the older version of grpc. I use 40 npm modules at least 10 are native and the only one w/ that does not work is Google Firebase. And no way to flag them or do PR.

I would suggest filling an issue with firebase then.