zeromq w/ Electron: Could not locate the bindings file
Asked Answered
F

1

6

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?

Fag answered 26/11, 2015 at 10:8 Comment(0)
F
5

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.

Fag answered 26/11, 2015 at 13:3 Comment(1)
i run "npm install --save-dev electron-rebuild" also the ".\node_modules\.bin\electron-rebuild.cmd" but this solution don't work for me ;/Nagaland

© 2022 - 2024 — McMap. All rights reserved.