I'm using Windows 7 x64, nodejs 5.1.0 and Electron 0.35. I followed the instructions from Electron Quick Start app and then added the line require("zmq")
to the main.js. At this point, after npm install zmq --save
, electron main.js
displays:
Error: Could not locate the bindings file. Tried:
[list of zmq.node
paths]
One of the paths tried is actually present in the system, i.e. node_modules/zmq/build/Release/zmq.node
If I remove the Electron app code and leave just the require("zmq")
line in main.js, I can successfully run with node main.js
. How am I supposed to get rid of the error when running with Electron?
Figured it out after reading Using Native Node Modules. Basically, after each npm install
of a native package, it needs to be rebuilt with Electron headers by issuing .\node_modules\.bin\electron-rebuild.cmd
.
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