I'm trying to require grpc in an electron app but I get the following error:
Error: dlopen(/srv/node_modules/grpc/src/node/extension_binary/grpc_node.node, 1): Symbol not found: _GENERAL_NAME_free
Referenced from: /srv/node_modules/grpc/src/node/extension_binary/grpc_node.node
Expected in: flat namespace
I'm using OSX Sierra 10.12.1, node 6.8.1, electron 1.4.4 and grpc 1.0.1-pre1.
I upgraded xcode command line tools and did a brew install openssl --force.
I built the binary with:
LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include ./node_modules/.bin/electron-rebuild
and manually with:
LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include HOME=~/.electron-gyp node-pre-gyp rebuild --target=1.4.4 --arch=x64 --dist-url=https://atom.io/download/atom-shell
But when I run the app I still get the error.
Rebuild the grpc module like so
npm install --save-dev electron-rebuild
(On Mac & Linux)
./node_modules/.bin/electron-rebuild
(On Windows)
.\node_modules\.bin\electron-rebuild.cmd
This will rebuild GRPC and you're good to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With