adrian.nicolau
adrian.nicolau

Reputation: 525

zeromq w/ Electron: Could not locate the bindings file

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?

Upvotes: 6

Views: 1789

Answers (1)

adrian.nicolau
adrian.nicolau

Reputation: 525

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.

Upvotes: 5

Related Questions