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
Same issue on Ubuntu 19.04, node 12.0.0 installed with nvm, grpc 1.18.0.
We are working on getting 1.20.1 out with node 12 support, stay tuned.
[email protected] is now out with Node 12 support.
Update: we had to unpublish 1.20.1 because it broke the TypeScript types. 1.20.2 will be out soon.
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 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.
version 1.20.2 is now out.
What is the process to upgrade gprc? I not see the new release in the repositorie.
It worked, I dont see errors running npm rebuild
Closing as resolved.
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.
Our yarn support always has been best effort. We don't officially support it.
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.
I would suggest filling an issue with firebase then.
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.
https://github.com/firebase/firebase-js-sdk
THANK YOU.
I am also using firebase in my project and it shows the issue. I thought that issue was related to yarn.
@aaaguirrep please upvote https://github.com/firebase/firebase-js-sdk/issues/1738