sciencefair-land / sciencefair

The futuristic, fabulous and free desktop app for working with scientific literature :microscope: :book:
https://sciencefair-app.com
MIT License
604 stars 52 forks source link

Cannot run git version: undefined symbols #156

Closed bjonnh closed 6 years ago

bjonnh commented 7 years ago

I get this error (Archlinux, up to date) when I try to start sciencefair: (I see that in the console of electron)

"Biblio/sciencefair/app/node_modules/nala-stream/node_modules/natural/lib/natural/classifiers/classifier.js:32 Uncaught Error: Biblio/sciencefair/app/node_modules/webworker-threads/build/Release/WebWorkerThreads.node: undefined symbol: _ZN2v811ArrayBuffer9Allocator7ReserveEm at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20) at Object.Module._extensions..node (module.js:598:18) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at bindings (Biblio/sciencefair/app/node_modules/bindings/bindings.js:76:44) at Object. (Biblio/sciencefair/app/node_modules/webworker-threads/index.js:1:198)"

CAYdenberg commented 7 years ago

I had this too. It's a problem with compiling the native module node-webworkerthreads and the version of Node and electron. I ended up going through the full first set of steps here: https://electron.atom.io/docs/tutorial/using-native-node-modules/#how-to-install-native-modules, even though electron-rebuild is supposed to do this.

Also make sure your electron and node versions line up. Sciencefair is Electron 1.7.2 in the package.json so use n or something to make sure you're running Node 7.x. Good luck!

adelq commented 6 years ago

Can confirm as well.

blahah commented 6 years ago

Thanks all for reporting and @CAYdenberg thanks for the breakdown. We actually don't use the webworkerthreads dependency, it's pulled in by another dependency and unused in our code, so I've added a simple build script to remove it (and DTrace, another problematic nested dependency with native bindings): https://github.com/codeforscience/sciencefair/blob/master/app/package.json#L12

Building master should now work as expected :)