Closed rreed closed 5 years ago
Double mystery: upgrading to npcap 0.991
instead of the version that is included with nmap
(0.99-r2
) fixes this problem. So in case anyone else sees the same, that fixed it for me. Will leave this open in case you need to fix anything, feel free to close it and sorry for wasting your time. :p
Perhaps the npcap installed with nmap did not have WinPCap compatibility? That's the only issue I could think of that would cause this kind of problem.
So this broke again mysteriously, after doing npm install
at some point. And now it works in the tests, but not when run under electron, rather than just being consistently broken everywhere.
Is there something I'm missing that is necessary to make this work in Electron always, rather than seemingly at random? :p (Likely just needs to be built a certain way, or...?)
Electron, nwjs, etc. all have special ways of compiling node addons to work with their projects. A quick google search for Electron brings up this link.
For anyone else who wanders this way in the future: my problem was that I had cap
in devDependencies
, not dependencies
, and electron-rebuild
was not playing nicely with that fact. This seems to be ACTUALLY fixed now, thanks for your patience. <3
Building an Electron app. This starts at, e.g.,
const cap = require('cap').Cap;
as in the documentation.Other folks are having similar problems, and fixed it with
node-gyp rebuild
ornode-gyp configure rebuild
; neither of these worked for me. (cap
rebuilds, but this behavior doesn't actually change.)Unit tests using the same also fail in the same way.