Grpc-node: gRPC problem in electron

Created on 3 Apr 2018  路  4Comments  路  Source: grpc/grpc-node

I have a trouble when using gRPC in electron, like " var grpc = require('grpc'); "
the error is A dynamic link DLL initialization routine failed
Anyone has the idea of how to solve this problem?
it't ergent, Thx!

Most helpful comment

If that was the problem, then the solution is actually simpler: when installing your packages, you can pass those arguments to the original npm install command. So, in your specific case, you would just have to do the following in your application directory:

npm install --runtime=electron --target=1.6.0

All 4 comments

I've already solved this annoying problem. It turned out it's very easy to fix.
Using npm to install windows-build-tools and node-pre-gyp then switch your directory to gRPC, finally set a bunch of node-pre-gyp parameters in cmd then run "npm install" to rebuild the gRPC source, the amazing part is that the output binary module "grpc_node" will be automatically located to the target dir, it's "electron-v1.6-win32-x64-unknown" to me, which is just the electron required when using gRPC module.

If that was the problem, then the solution is actually simpler: when installing your packages, you can pass those arguments to the original npm install command. So, in your specific case, you would just have to do the following in your application directory:

npm install --runtime=electron --target=1.6.0

Your solution seems more efficient I鈥檒l take a shot later! :)

With no activity, and based on the last statements, this one seems closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

badoet picture badoet  路  4Comments

aryehb picture aryehb  路  6Comments

yanbou893 picture yanbou893  路  5Comments

moloch-- picture moloch--  路  5Comments

shotor picture shotor  路  3Comments