node-usb-detection icon indicating copy to clipboard operation
node-usb-detection copied to clipboard

symbol lookup error

Open 17nishad opened this issue 3 years ago • 2 comments
trafficstars

I got this error when I try to start my electron app.

/node_modules/electron/dist/electron remote.js: symbol lookup error: /node_modules/usb-detection/build/Release/detection.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeEPKNS_9CFunctionE

17nishad avatar Feb 15 '22 07:02 17nishad

I'm getting a similar error as the one above:

dyld: lazy symbol binding failed: Symbol not found: __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeEPKNS_9CFunctionEhhh
  Referenced from: /Users/burlacuionutmihai/Desktop/mokiapp-electron/app/node_modules/usb-detection/build/Release/detection.node
  Expected in: flat namespace

dyld: Symbol not found: __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeEPKNS_9CFunctionEhhh
  Referenced from: /Users/burlacuionutmihai/Desktop/mokiapp-electron/app/node_modules/usb-detection/build/Release/detection.node
  Expected in: flat namespace```

IonutBurlacu avatar Mar 20 '22 08:03 IonutBurlacu

Got the same error as @IonutBurlacu on electron 13 & usb-detection 14.4.1. electron-rebuild didn't appear to do anything, it returned immediately. although it did replace the .node file. I went into node_modules/usb-detection and ran a yarn install and that at least resolved the electron crash on startup due to missing symbols, but usb-detection still wouldn't work, got an exception when trying to require it. I added a postinstall script to my package.json to run electron-builder install-app-deps and that fixed everything up

brenthompson avatar May 02 '22 17:05 brenthompson