node-hid: node-hid prebuilds do not work with Electron 4, due to ABI incompatibilities

Electron 4.0.0 was just released. It is the main release.

Electron 4.0.0 uses node 10.11.0.

It seems to build fine with rebuild, and it works when I require.

However, when I try to call hid.devices(), i get:

dyld: lazy symbol binding failed: Symbol not found: __ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE
  Referenced from: /Users/setpixel/git/shot-generator/node_modules/node-hid/build/Release/HID.node
  Expected in: flat namespace

dyld: Symbol not found: __ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE
  Referenced from: /Users/setpixel/git/shot-generator/node_modules/node-hid/build/Release/HID.node
  Expected in: flat namespace`

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 25 (13 by maintainers)

Commits related to this issue

Most upvoted comments

I believe this is fixed now in node-hid@0.7.7 thanks to Electron v4.0.4+. Tested with an updated https://github.com/todbot/electron-hid-toy Be sure to update your package.json to include updated electron, electron-rebuild, and electron-builder.

There seems to be more details on this issue here: https://github.com/lgeiger/node-abi/pull/55

TL;DR: The ABI for both Electron v3 and v4 is 64, but the builds are not compatible (probably because they switched from GYP to GN).