Closed causztic closed 7 years ago
Electron supports native node modules, but because it comes bundled with its own V8 runtime there's some additional complexity. Likely your local version and electron version of v8 are mismatched.
Snowboy uses node-pre-gyp
so I suggest using electron-rebuild to rebuild the module. Make sure to use the correct headers when rebuilding.
Looks like you are on macOS so you dont need this, but for anyone else interested: On Linux you'll need the following libraries to build:
sudo apt-get install libmagic-dev libatlas-base-dev
Thanks for the tip!
I've used ./node_modules/.bin/electron-rebuild --pre-gyp-fix
and it created the version in the lib folder correctly.
Just a quick tip: sudo apt-get install libmagic-dev libatlas-base-dev
is for Raspbian, etc. To get the same libraries for Arch Linux:
I had to install file 5.32-1
from the Arch Linux packages & openblas-lapack 0.2.20-1
from the AUR user repository: https://aur.archlinux.org/packages/openblas-lapack/
Hi!
I'm currently using the python library and spawning a child process for snowboy in Electron to detect my hotwords, and it works pretty well! I've noticed that you guys recently added the Node library so I wanted to update my code for better flexibility.
While adding the example code
const { Models, Detector } = require("snowboy");
Electron throws an error of
Any ideas?