NWJS doesn’t work properly with GRPC for Node.js

NWJS doesn’t work with GRPC for Node.js,
Run it with Node.JS directly just act as normal.

  • State which version are you using
    Version 0.15.4
  • State which OS version are you running with
    OS X El Captian
  • Provide a reproducible case if possible
    Install GRPC node.js module in the project folder.
    $ npm intall grpc
    and run the application that using GPRC via nwjs.
  • Error message
    /Users/David/Downloads/app.nw/node_modules/grpc/src/node/src/client.js:334
    var call = new grpc.Call(channel, method, deadline, host,
             ^TypeError: Call's fifth argument must be another call, if provided
    at TypeError (native)
    at getCall (/Users/David/Downloads/app.nw/node_modules/grpc/src/node/src/client.js:334:14)
    at Client.makeUnaryRequest [as sayHello](/Users/David/Downloads/app.nw/node_modules/grpc/src/node/src/client.js:372:16)
    at chrome-extension://jdgkbifmkkkcgglljmlojibojoafmlhi/test.js:13:8

Here is the source code: Archive.zip

Author: Fantashit

1 thought on “NWJS doesn’t work properly with GRPC for Node.js

  1. GRPC is a native module written in C/C++. Did your rebuild it with node-pre-gyp? If not, please install latest nw-gyp with NPM and rebuild with following command:

    cd node_modules/grpc
    ./node_modules/.bin/node-pre-gyp rebuild --runtime=node-webkit --target=0.15.4 --target_arch=x64

    Or you can build grpc at the time of installing it with NPM by using following command:

    npm install grpc --build-from-source --runtime=node-webkit --target=0.15.4 --target_arch=x64

Comments are closed.