grpc-node icon indicating copy to clipboard operation
grpc-node copied to clipboard

Fails to build with node.js v12.0.0 release

Open mdouglass opened this issue 7 years ago • 33 comments

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

mdouglass avatar Apr 23 '19 22:04 mdouglass

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

sangaman avatar Apr 24 '19 07:04 sangaman

We are working on getting 1.20.1 out with node 12 support, stay tuned.

nicolasnoble avatar Apr 24 '19 17:04 nicolasnoble

[email protected] is now out with Node 12 support.

murgatroid99 avatar Apr 26 '19 19:04 murgatroid99

Update: we had to unpublish 1.20.1 because it broke the TypeScript types. 1.20.2 will be out soon.

murgatroid99 avatar Apr 26 '19 22:04 murgatroid99

I have the next issue with nodejs 12.0 when it runs npm rebuild, is it the same issue?

3585 error code ELIFECYCLE
3586 error errno 1
3587 error [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
3587 error Exit status 1
3588 error Failed at the [email protected] install script.
3588 error This is probably not a problem with npm. There is likely additional logging output above.
3589 verbose exit [ 1, true ]

aaaguirrep avatar Apr 27 '19 12:04 aaaguirrep

@aaaguirrep you haven't provided nearly enough information for us to tell if that's the case, but it most likely is, since it's 100% impossible to use grpc with node 12 at the moment.

nicolasnoble avatar Apr 27 '19 12:04 nicolasnoble

version 1.20.2 is now out.

murgatroid99 avatar Apr 29 '19 16:04 murgatroid99

What is the process to upgrade gprc? I not see the new release in the repositorie.

aaaguirrep avatar Apr 29 '19 23:04 aaaguirrep

What is the process to upgrade gprc?

npm install [email protected] should work.

sangaman avatar Apr 29 '19 23:04 sangaman

It worked, I dont see errors running npm rebuild

aaaguirrep avatar Apr 29 '19 23:04 aaaguirrep

Closing as resolved.

nicolasnoble avatar Apr 30 '19 01:04 nicolasnoble

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.

aaaguirrep avatar Apr 30 '19 02:04 aaaguirrep

Our yarn support always has been best effort. We don't officially support it.

nicolasnoble avatar Apr 30 '19 14:04 nicolasnoble

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.

cekvenich avatar May 01 '19 13:05 cekvenich

I would suggest filling an issue with firebase then.

nicolasnoble avatar May 01 '19 13:05 nicolasnoble

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.

cekvenich avatar May 01 '19 13:05 cekvenich

https://github.com/firebase/firebase-js-sdk

nicolasnoble avatar May 01 '19 14:05 nicolasnoble

THANK YOU.

cekvenich avatar May 01 '19 14:05 cekvenich

I am also using firebase in my project and it shows the issue. I thought that issue was related to yarn.

aaaguirrep avatar May 01 '19 14:05 aaaguirrep

@aaaguirrep please upvote https://github.com/firebase/firebase-js-sdk/issues/1738

cekvenich avatar May 01 '19 15:05 cekvenich